-
-
Notifications
You must be signed in to change notification settings - Fork 12
46 lines (40 loc) · 1.26 KB
/
docker.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
name: Deploy to Docker
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
deploy:
name: Deploy to Docker add-on with tag
runs-on: ubuntu-latest
environment: CI - release environment
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git Semantic Version
id: version
uses: paulhatch/semantic-version@v5.4.0
with:
version_format: "${major}.${minor}.${patch}-b${increment}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to Docker hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🛠️ Run Buildx
run: |
docker buildx build \
--platform linux/arm,linux/arm64,linux/amd64 \
--output "type=image,push=true" \
--file ./Dockerfile . \
--tag "espresense/espresense-companion:${{ steps.version.outputs.version }}"