Skip to content

Build rolling image #61

Build rolling image

Build rolling image #61

name: Build rolling image
# This workflow builds a fresh image for the current 'master'-branch every day
# and on pushes.
#
# Similar to `build-images`, this workflow only defines the image and building
# is handled in `image-build.yml`.
#
# The definition is the same as in `build-images.yml`, except for the fact it
# must be defined in a JSON-String, since parameters can only be transferred as
# simple types!
on:
schedule:
- cron: "0 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:
image:
permissions:
packages: write # needed for publishing images on GH package registry
if: github.repository == 'CycloneDX/cdxgen'
uses: ./.github/workflows/image-build.yml
secrets: inherit
with:
image: |
{
"lang": "rolling",
"distro": "opensuse",
"runner": "macos-hosted",
"base-image": {
"lang": "lang"
}
}
latest: false
retry:
needs: image
if: failure() && fromJSON(github.run_attempt) < 3
runs-on: ubuntu-latest
steps:
- run: gh workflow run rerun-workflow.yml -F run_id=${{ github.run_id }}
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}