Skip to content

Commit 4ff5d81

Browse files
authored
Merge pull request #490 from DannyBen/add/docker-build-action
Build multi-arch docker image using GitHub Actions
2 parents a2eb37c + 999e819 commit 4ff5d81

File tree

3 files changed

+28
-22
lines changed

3 files changed

+28
-22
lines changed

.github/workflows/debug.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.
File renamed without changes.

.github/workflows/docker-latest.yml

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/bashly,dannyben/bashly:${{ env.TAG }}

0 commit comments

Comments
 (0)