-
-
Notifications
You must be signed in to change notification settings - Fork 13
56 lines (54 loc) · 1.63 KB
/
python-docker-edge.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
name: Upload Edge Docker Image
on:
push:
branches: [ main ]
paths:
- .github/workflows/python-docker-edge.yml
- docker/Dockerfile-edge
- weconnect_mqtt/**
- '**requirements.txt'
- '**.cfg'
- '**.py'
jobs:
docker-deploy:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/[email protected]
with:
images: |
tillsteinbach/weconnect-mqtt
ghcr.io/tillsteinbach/weconnect-mqtt
tags: |
type=edge
- name: Set up QEMU
uses: docker/[email protected]
- name: Setup Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/[email protected]
with:
context: .
file: docker/Dockerfile-edge
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max