Skip to content

Commit

Permalink
Rearrange release action as token is not accessible to other jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbyul-here committed Dec 18, 2024
1 parent 1421a12 commit ab056b9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,11 @@ jobs:
release:
runs-on: ubuntu-latest
outputs:
APP_TOKEN: ${{ steps.generate-token.outputs.token }}
VERSION_NUMBER: ${{ steps.git-release.outputs.VERSION_NUMBER }}
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
- uses: actions/checkout@v4
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PEM }}
owner: ${{ github.repository_owner }}
repositories: |
veda-ui
veda-config
- run: echo ${{ steps.generate-token.outputs.token }}
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# token: ${{ steps.generate-token.outputs.token }}
fetch-depth: 0
# - name: git config
# run: |
# git config user.name "${GITHUB_ACTOR}"
Expand All @@ -53,12 +40,20 @@ jobs:
runs-on: ubuntu-latest
needs: "release"
steps:
- name: Check output
run: echo ${{needs.release.outputs.APP_TOKEN}}
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PEM }}
owner: ${{ github.repository_owner }}
repositories: |
veda-ui
veda-config
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ needs.release.outputs.APP_TOKEN }}
token: ${{steps.generate-token.outputs.token}}
repository: nasa-impact/veda-config
event-type: update-version
client-payload: '{"ref": "${{ github.ref }}", "VERSION_NUMBER": "${{ needs.release.outputs.VERSION_NUMBER || inputs.VERSION_NUMBER }}"}'
Binary file added bin/act
Binary file not shown.

0 comments on commit ab056b9

Please sign in to comment.