diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 89376878..df431ebf 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -17,6 +17,14 @@ jobs: uses: actions/checkout@v3 - uses: greenbone/actions/is-latest-tag@v2 id: latest + - name: Set container build options + id: container-opts + run: | + if [[ "${{ github.ref_type }}" = 'tag' ]]; then + echo "version=stable" >> $GITHUB_OUTPUT + else + echo "version=edge" >> $GITHUB_OUTPUT + fi - name: 'Setup meta information (IS_LATEST_TAG: ${{ steps.latest.outputs.is-latest-tag }} )' id: meta uses: docker/metadata-action@v4 @@ -59,3 +67,5 @@ jobs: platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + VERSION=${{ steps.container-opts.outputs.version }}