-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (47 loc) · 1.99 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
47
48
49
50
51
52
53
54
55
56
name: Build Docker images
run-name: ${{ github.actor }} is building Docker images
on:
push:
workflow_dispatch:
schedule:
- cron: '0 0 * * 6'
jobs:
log-metadata:
runs-on: ubuntu-latest
steps:
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}."
- run: echo "The images will be deployed to dockerhub ${{ github.ref == 'refs/heads/master' }}"
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# docker build --no-cache --pull -t wolkenschieber/docker-chromium:latest .
- name: Build and push amd64 image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: ${{ github.ref == 'refs/heads/master' }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.DOCKERHUB_IMAGENAME }}:latest
# docker buildx build --no-cache --platform linux/arm64 --pull -t wolkenschieber/docker-chromium:arm64v8-latest -f Dockerfile.aarch64 .
- name: Build and push arm64v8 image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.aarch64
platforms: linux/arm64/v8
push: ${{ github.ref == 'refs/heads/master' }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.DOCKERHUB_IMAGENAME }}:${{ vars.DOCKERHUB_ARM_PREFIX }}-latest
- run: echo "Finished with status ${{ job.status }}."