-
Notifications
You must be signed in to change notification settings - Fork 7
100 lines (88 loc) · 3.12 KB
/
sam-cli.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: sam-cli
on:
push:
branches: [ master ]
paths:
- 'sam-cli/**'
- .github/workflows/sam-cli.yaml
jobs:
build-and-publish-latest:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Repository
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: vars
name: set variables from version file in the directory
run: |
output=$(cat sam-cli/version)
echo "::set-output name=version::$output"
- name: Build python 3.8 and Push Container Image to GitHub Container Repository
uses: docker/build-push-action@v3
with:
context: ./sam-cli
push: true
tags: |
ghcr.io/base2services/sam-cli:latest
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }}
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }}-py3.8
labels: |
runnumber=${GITHUB_RUN_ID}
org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}
build-args: |
PYTHON_VERSION=3.8
- name: Build python 3.9 and Push Container Image to GitHub Container Repository
uses: docker/build-push-action@v3
with:
context: ./sam-cli
push: true
tags: |
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }}-py3.9
labels: |
runnumber=${GITHUB_RUN_ID}
org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}
build-args: |
PYTHON_VERSION=3.9
- name: Build python 3.7 and Push Container Image to GitHub Container Repository
uses: docker/build-push-action@v3
with:
context: ./sam-cli
push: true
tags: |
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }}-py3.7
labels: |
runnumber=${GITHUB_RUN_ID}
org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}
build-args: |
PYTHON_VERSION=3.7
- name: Build python 3.11 and Push Container Image to GitHub Container Repository
uses: docker/build-push-action@v3
with:
context: ./sam-cli
push: true
tags: |
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }}-py3.11
labels: |
runnumber=${GITHUB_RUN_ID}
org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}
build-args: |
PYTHON_VERSION=3.11
- name: Build python 3.12 and Push Container Image to GitHub Container Repository
uses: docker/build-push-action@v3
with:
context: ./sam-cli
push: true
tags: |
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }}-py3.12
labels: |
runnumber=${GITHUB_RUN_ID}
org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}
build-args: |
PYTHON_VERSION=3.12