-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.79 KB
/
python.yml
File metadata and controls
47 lines (45 loc) · 1.79 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
name: Image Builder Python
on:
push:
schedule:
- cron: "0 0 */5 * *"
workflow_dispatch:
jobs:
Python:
strategy:
matrix:
build: [
"3.10", "3.9"
]
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.build }}
# - name: Setup docker-slim
# run: curl -sL https://raw.githubusercontent.com/docker-slim/docker-slim/master/scripts/install-dockerslim.sh | sudo -E bash -
- name: Setup docker-squash
run: pip install --user https://github.com/goldmann/docker-squash/archive/master.zip
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.2.1
- name: Login to DockerHub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker
run : |
docker build -f ${{ matrix.build }}/Dockerfile -t jpratama7/bullseye-python:latest-${{ matrix.build }} .
# docker-squash -v -t jpratama7/bullseye-python:latest-${{ matrix.build }} jpratama7/bullseye-python:build-fat-${{ matrix.build }}
# docker-squash -v -t jpratama7/bullseye-python:${{ steps.date.outputs.date }}-${{ matrix.build }} jpratama7/bullseye-python:build-fat-${{ matrix.build }}
# docker push jpratama7/bullseye-python:${{ steps.date.outputs.date }}-${{ matrix.build }}
docker push jpratama7/bullseye-python:latest-${{ matrix.build }}