Publish Container Image #1
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: Publish Container Image | |
on: | |
workflow_dispatch: | |
inputs: | |
image_version: | |
description: "Image version" | |
default: "dev" | |
type: string | |
required: False | |
workflow_call: | |
inputs: | |
image_version: | |
description: "Image version" | |
default: "dev" | |
type: string | |
required: False | |
jobs: | |
publish_container_image: | |
permissions: | |
contents: read | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout release tag | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
with: | |
fetch-depth: 0 | |
ref: ${{ inputs.image_version }} | |
- name: Set default Python version | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 | |
with: | |
python-version: '3.10' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 | |
with: | |
context: . | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
ghcr.io/repository-service-tuf/repository-service-tuf-worker:${{ inputs.image_version }} | |
build-args: | | |
RELEASE_VERSION=${{ inputs.image_version }} |