-
Notifications
You must be signed in to change notification settings - Fork 9
62 lines (56 loc) · 2.25 KB
/
Copy pathbuild-container-images.yaml
File metadata and controls
62 lines (56 loc) · 2.25 KB
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
60
61
62
---
name: build-container-images
on:
workflow_dispatch:
pull_request:
paths:
- "containers/python311_alpine/**"
- "containers/python312_alpine/**"
push:
branches:
- main
paths:
- "containers/python311_alpine/**"
- "containers/python312_alpine/**"
merge_group:
types: [checks_requested]
# bump container versions here, they will be populated to tags and labels
env:
VERSION_PYTHON311: 0.0.1
VERSION_PYTHON312: 0.0.1
jobs:
build-ghcr-registry:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Login to ghcr.io
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and deploy Python 3.11 image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
with:
context: containers/python311_alpine/
file: containers/python311_alpine/Dockerfile
# push for all main branch commits
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository }}/argo-python3.11.8-alpine3.19:latest,ghcr.io/${{ github.repository }}/argo-python3.11.8-alpine3.19:${{ env.VERSION_PYTHON311 }}
labels: |
org.opencontainers.image.version=${{ env.VERSION_PYTHON311 }}
- name: Build and deploy Python 3.12 image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
with:
context: containers/python312_alpine/
file: containers/python312_alpine/Dockerfile
# push for all main branch commits
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository }}/argo-python3.12.2-alpine3.19:latest,ghcr.io/${{ github.repository }}/argo-python3.12.2-alpine3.19:${{ env.VERSION_PYTHON312 }}
labels: |
org.opencontainers.image.version=${{ env.VERSION_PYTHON312 }}