Skip to content

Build docker image

Build docker image #3

Workflow file for this run

name: Build docker image
on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'
jobs:
build:
name: Build docker image
runs-on: ubuntu-22.04
permissions:
id-token: write
checks: write
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Set env
id: set-version
run: echo "release_version=${GITHUB_REF#refs/*/}" | tee -a $GITHUB_OUTPUT
- name: Log in to the Container registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push container image
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/edgelesssys/mint:${{ steps.set-version.outputs.release_version }}