Skip to content

Commit

Permalink
chore(action): fix script executable and change token order (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Lukasz Dziedziak <[email protected]>
  • Loading branch information
lukidzi authored and github-actions[bot] committed Nov 25, 2024
1 parent ba0ced9 commit 3bd9f12
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Empty file modified .github/scripts/get-version-tags.sh
100644 → 100755
Empty file.
12 changes: 8 additions & 4 deletions .github/workflows/sync-with-upstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,22 @@ jobs:
runs-on: ubuntu-latest
name: Sync with upstream main
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
persist-credentials: false
- name: Generate GitHub app token
id: github-app-token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
token: ${{ steps.github-app-token.outputs.token }}
- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
git_config_user: ${{ env.GH_USER }}
git_config_email: ${{ env.GH_EMAIL }}
target_sync_branch: main
target_repo_token: ${{ steps.github-app-token.outputs.token }}
target_branch_push_args: "-f --tags"
Expand All @@ -53,6 +55,7 @@ jobs:
shell: bash
run: ".github/scripts/get-version-tags.sh"
- name: Print tags
if: steps.sync.outputs.has_new_commits == 'true'
run: |
echo "Current fork tag: ${{ steps.new-version-tag.outputs.released_tag }}"
echo "Newest upstream tag: ${{ steps.new-version-tag.outputs.main_tag }}"
Expand All @@ -61,6 +64,7 @@ jobs:
if: steps.new-version-tag.outputs.released_tag != steps.new-version-tag.outputs.main_tag
run: |
git remote -v
git remote set-url origin https://${{ steps.github-app-token.outputs.token }}@github.com/kumahq/go-control-plane.git
git config user.name "${GH_USER}"
git config user.email "${GH_EMAIL}"
git checkout release
Expand Down

0 comments on commit 3bd9f12

Please sign in to comment.