Releasing 3.2.1 #3
Workflow file for this run
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 Publish docker image | |
# pretty slow so done only for releases | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
build-and-push-docker-image: | |
name: Build Docker image and push to github docker repository | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout code | |
uses: actions/checkout@v4 | |
- | |
name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ env.REGISTRY }}/boavizta/cloud-scanner-cli | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- | |
name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- | |
name: Setup Docker buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: cloud-scanner-cli | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |