-
Notifications
You must be signed in to change notification settings - Fork 148
75 lines (72 loc) · 2.68 KB
/
push_poetry_container.yaml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
name: push-poetry-container
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-ci
POETRY_VERSION: 1.3.2
PYTHON_PRIMARY_VERSION: 3.8.16
PYTHON_PRIMARY_TAG: py38
PYTHON_SECONDARY_VERSION: 3.10.9
PYTHON_SECONDARY_TAG: py310
DEBIAN_VERSION: bullseye
on:
push:
paths:
- .devcontainer/Dockerfile
branches:
- devel
workflow_dispatch:
jobs:
push-poetry-container:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to GCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Echo
run: |
echo "USER: ${{ github.actor }}"
echo "REPOSITORY: ${{ github.repository }}"
echo "POETRY_VERSION: ${POETRY_VERSION}"
echo "PYTHON_PRIMARY_VERSION: ${PYTHON_PRIMARY_VERSION}"
echo "PYTHON_SECONDARY_VERSION: ${PYTHON_SECONDARY_VERSION}"
echo "TAGS: ${{ steps.meta.outputs.tags }}"
echo "LABELS: ${{ steps.meta.outputs.labels }}"
- name: Image - poetry${{ env.POETRY_VERSION }}-python${{ env.PYTHON_PRIMARY_VERSION }}
uses: docker/build-push-action@v3
with:
file: ./.devcontainer/Dockerfile
push: true
build-args: |
PYTHON_VERSION=${{ env.PYTHON_PRIMARY_VERSION }}
POETRY_VERSION=${{ env.POETRY_VERSION }}
DEBIAN_VERSION=${{ env.DEBIAN_VERSION }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.PYTHON_PRIMARY_TAG }}-poetry-${{ env.DEBIAN_VERSION }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:python${{ env.PYTHON_PRIMARY_VERSION }}-poetry${{ env.POETRY_VERSION }}-${{ env.DEBIAN_VERSION }}
labels: ${{ steps.meta.outputs.labels }}
- name: Image - poetry${{ env.POETRY_VERSION }}-python${{ env.PYTHON_SECONDARY_VERSION }}
uses: docker/build-push-action@v3
with:
file: ./.devcontainer/Dockerfile
push: true
build-args: |
PYTHON_VERSION=${{ env.PYTHON_SECONDARY_VERSION }}
POETRY_VERSION=${{ env.POETRY_VERSION }}
DEBIAN_VERSION=${{ env.DEBIAN_VERSION }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.PYTHON_SECONDARY_TAG }}-poetry-${{ env.DEBIAN_VERSION }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:python${{ env.PYTHON_SECONDARY_VERSION }}-poetry${{ env.POETRY_VERSION }}-${{ env.DEBIAN_VERSION }}
labels: ${{ steps.meta.outputs.labels }}