Skip to content

Commit 4d20dfd

Browse files
committed
- Build docker images automatically
1 parent 9b9005b commit 4d20dfd

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.github/workflows/docker-edge.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Docker build (edge)
2+
on:
3+
push: { branches: master }
4+
5+
jobs:
6+
docker:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Set up QEMU
12+
uses: docker/setup-qemu-action@v3
13+
- name: Set up Docker Buildx
14+
uses: docker/setup-buildx-action@v3
15+
- name: Login to Docker Hub
16+
uses: docker/login-action@v3
17+
with:
18+
username: ${{ secrets.DOCKERHUB_USERNAME }}
19+
password: ${{ secrets.DOCKERHUB_TOKEN }}
20+
- name: Build and push
21+
uses: docker/build-push-action@v5
22+
with:
23+
context: .
24+
platforms: linux/amd64,linux/arm64
25+
push: true
26+
tags: dannyben/completely:edge
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Docker build (version + latest)
2+
on:
3+
push: { tags: 'v[0-9]+.[0-9]+.[0-9]+' }
4+
5+
jobs:
6+
docker:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Extract tag
12+
run: echo "TAG=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
13+
- name: Set up QEMU
14+
uses: docker/setup-qemu-action@v3
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v3
17+
- name: Login to Docker Hub
18+
uses: docker/login-action@v3
19+
with:
20+
username: ${{ secrets.DOCKERHUB_USERNAME }}
21+
password: ${{ secrets.DOCKERHUB_TOKEN }}
22+
- name: Build and push
23+
uses: docker/build-push-action@v5
24+
with:
25+
context: .
26+
platforms: linux/amd64,linux/arm64
27+
push: true
28+
tags: dannyben/completely,dannyben/completely:${{ env.TAG }}

0 commit comments

Comments
 (0)