Build and push release images from main #29
This file contains 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: Build and push release images from main | |
on: | |
workflow_dispatch: | |
inputs: | |
release: | |
description: 'SecObserve scanners release (without the v)' | |
required: true | |
permissions: read-all | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: 'v${{ github.event.inputs.release }}' | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Set current date as env variable | |
run: echo "CREATED=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV | |
- | |
name: Build and push scanners | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./docker//Dockerfile | |
push: true | |
tags: | | |
maibornwolff/secobserve-scanners:${{ github.event.inputs.release }} | |
maibornwolff/secobserve-scanners:latest | |
build-args: | | |
CREATED=${{ env.CREATED }} | |
REVISION=${{ github.sha }} | |
VERSION=${{ github.event.inputs.release }} | |
- | |
name: Build and push ZAP | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./docker_zap//Dockerfile | |
push: true | |
tags: | | |
maibornwolff/secobserve-scanners-zap:${{ github.event.inputs.release }} | |
maibornwolff/secobserve-scanners-zap:latest | |
build-args: | | |
CREATED=${{ env.CREATED }} | |
REVISION=${{ github.sha }} | |
VERSION=${{ github.event.inputs.release }} |