Skip to content

build-image

build-image #2

Workflow file for this run

name: build-image
on:
# yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches:
- "master"
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: github.ref == 'refs/heads/main'
-
name: Build and push to ghcr.io
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/telekom-mms/docker-trivy-dojo-operator:latest
if: github.ref == 'refs/heads/main'