Skip to content

build-image

build-image #30

Workflow file for this run

name: build-image
on: # yamllint disable-line rule:truthy
workflow_dispatch:
release:
types:
- published
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push to ghcr.io
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/telekom-mms/docker-trivy-dojo-operator:latest,ghcr.io/telekom-mms/docker-trivy-dojo-operator:${{ github.event.release.tag_name }}
helm:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.8.1
- name: Install helm plugin
run: |
helm plugin install https://github.com/sstarcher/helm-release
- name: Update Chart.yaml
run: |
helm release -t ${{ github.event.release.tag_name }} --path operator.trivyDojoReportOperator.image.tag charts/
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"