Rebuild release images #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rebuild release images | |
on: | |
schedule: | |
- cron: "0 16 * * 6" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token | |
permissions: {} | |
jobs: | |
rebuild-latest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Read latest | |
id: read_latest | |
run: | | |
echo "release=$(gh api -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2022-11-28' -q '.[0].tag_name' /repos/CycloneDX/cdxgen/releases)" > $GITHUB_OUTPUT | |
env: | |
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} | |
- name: Rebuild latest | |
run: gh workflow run build-images.yml -r refs/tags/${{ steps.read_latest.outputs.release }} -f latest=true | |
env: | |
GH_REPO: ${{ github.repository }} | |
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} | |
rebuild-previous: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Read previous | |
id: read_previous | |
run: | | |
echo "release=$(gh api -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2022-11-28' -q '.[1].tag_name' /repos/CycloneDX/cdxgen/releases)" > $GITHUB_OUTPUT | |
env: | |
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} | |
- name: Rebuild previous | |
run: gh workflow run build-images.yml -r refs/tags/${{ steps.read_previous.outputs.release }} -f latest=false | |
env: | |
GH_REPO: ${{ github.repository }} | |
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} |