Skip to content

Commit

Permalink
Avocado bot token in release workflow
Browse files Browse the repository at this point in the history
It adds Avocado bot organization token to the release workflow instead of
personal token. This makes the release independent to one specific avocado
maintainer.

Signed-off-by: Jan Richter <jarichte@redhat.com>
  • Loading branch information
richtja committed Mar 26, 2024
1 parent e2755cb commit 0d09867
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ jobs:
URL: "https://readthedocs.org/api/v3/projects/${{ github.event.inputs.rtd_project }}"

steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c
with:
app_id: ${{ secrets.MR_AVOCADO_ID }}
installation_id: ${{ secrets.MR_AVOCADO_INSTALLATION_ID }}
private_key: ${{ secrets.MR_AVOCADO_PRIVATE_KEY }}
- name: install required packages
run: dnf -y install rpmdevtools git python3-pip make
- uses: actions/checkout@v3
Expand All @@ -59,7 +66,7 @@ jobs:
- name: Push changes to github
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.RELEASE_TOKEN }}
github_token: ${{ steps.generate_token.outputs.token }}
branch: ${{ github.ref }}
- name: Build wheel
run: make -f Makefile.gh build-wheel check-wheel
Expand Down Expand Up @@ -104,7 +111,7 @@ jobs:
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.RELEASE_TOKEN }}
repo_token: ${{ steps.generate_token.outputs.token }}
file: ${{ github.workspace }}/EGG_UPLOAD/avocado_framework*egg
tag: ${{ github.event.inputs.version }}
overwrite: true
Expand Down

0 comments on commit 0d09867

Please sign in to comment.