Skip to content

Commit 96b7539

Browse files
committed
Add github action to build multi-arch docker image and publish to docker hub
1 parent 5abb9e3 commit 96b7539

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
name: Docker build
7+
8+
jobs:
9+
buildx:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- id: get_version
13+
uses: battila7/get-version-action@v2
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v1
18+
- name: Set up Docker Buildx
19+
id: buildx
20+
uses: docker/setup-buildx-action@v1
21+
- name: Login to DockerHub
22+
uses: docker/login-action@v1
23+
with:
24+
username: ${{ secrets.DOCKERHUB_USERNAME }}
25+
password: ${{ secrets.DOCKERHUB_TOKEN }}
26+
- name: Build and push
27+
uses: docker/build-push-action@v2
28+
with:
29+
context: .
30+
platforms: linux/amd64,linux/arm64
31+
push: true
32+
tags: nlpir/libreoffice:${{ steps.get_version.outputs.version-without-v }}

0 commit comments

Comments
 (0)