-
Notifications
You must be signed in to change notification settings - Fork 16
59 lines (52 loc) · 1.63 KB
/
publish_container.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
ref: ${{ inputs.image_version }}
- name: Set default Python version
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.10'
- name: Set up QEMU
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5
- 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@b32b51a8eda65d6793cd0494a773d4f6bcef32dc
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 }}