Skip to content

Commit

Permalink
ci: grant write permission to sync workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
josedev-union committed Jan 20, 2024
1 parent 7cee598 commit 6765f77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
- cron: "0 */24 * * *"
workflow_dispatch:

permissions:
contents: write
pull-requests: write

env:
# Upstream repo name
UPSTREAM_REPO: https://github.com/apache/superset
Expand All @@ -26,7 +30,7 @@ jobs:
echo "Fetching upstream"
git remote add tmp_upstream ${{ env.UPSTREAM_REPO }}
git fetch tmp_upstream --tags
latest_tag_commit=$(git ls-remote --tags --sort=committerdate remote|egrep -iv 'helm|rc'|tail -1|awk '{print $1}')
latest_tag_commit=$(git ls-remote --tags --sort=committerdate tmp_upstream|egrep -iv 'helm|rc'|tail -1|awk '{print $1}')
echo "Pushing the latest tag commit as the origin SYNC_DEST_BRANCH"
git branch -D upstream
Expand Down

0 comments on commit 6765f77

Please sign in to comment.