Skip to content

Commit b3420d7

Browse files
bjoernricksnichtsfrei
authored andcommitted
Fix: Build container image release from stable openvas-scanner image
When creating releases the container image should be build from the lastest stable openvas-scanner image. Otherwise the edge image should be used to check if the image still builds.
1 parent 96bfdac commit b3420d7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/container.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ jobs:
1717
uses: actions/checkout@v3
1818
- uses: greenbone/actions/is-latest-tag@v2
1919
id: latest
20+
- name: Set container build options
21+
id: container-opts
22+
run: |
23+
if [[ "${{ github.ref_type }}" = 'tag' ]]; then
24+
echo "version=stable" >> $GITHUB_OUTPUT
25+
else
26+
echo "version=edge" >> $GITHUB_OUTPUT
27+
fi
2028
- name: 'Setup meta information (IS_LATEST_TAG: ${{ steps.latest.outputs.is-latest-tag }} )'
2129
id: meta
2230
uses: docker/metadata-action@v4
@@ -59,3 +67,5 @@ jobs:
5967
platforms: linux/amd64,linux/arm64
6068
tags: ${{ steps.meta.outputs.tags }}
6169
labels: ${{ steps.meta.outputs.labels }}
70+
build-args: |
71+
VERSION=${{ steps.container-opts.outputs.version }}

0 commit comments

Comments
 (0)