Skip to content

Commit 7fa5b6d

Browse files
authored
Merge pull request #21 from danielsuguimoto/arm
ARM support
2 parents b8f2acf + d7807cf commit 7fa5b6d

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

.github/workflows/docker.yml

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,36 @@ jobs:
1313
- name: Checkout code
1414
uses: actions/checkout@master
1515

16+
- name: Setup QEMU
17+
uses: docker/setup-qemu-action@v2
18+
19+
- name: Setup Docker Buildx
20+
uses: docker/setup-buildx-action@v2
21+
22+
- name: Login to DockerHub
23+
uses: docker/login-action@v2
24+
if: github.ref == 'refs/heads/master' && github.repository == 'kool-dev/pdf'
25+
with:
26+
username: ${{ secrets.DOCKER_USERNAME }}
27+
password: ${{ secrets.DOCKER_PASSWORD }}
28+
1629
- uses: olegtarasov/[email protected]
1730
id: tagName
1831

19-
- name: Build image
20-
env:
21-
TAGNAME: ${{ steps.tagName.outputs.tag }}
22-
run: docker build --pull -t kooldev/pdf:$TAGNAME .
23-
24-
- name: Push to hub
25-
env:
26-
TAGNAME: ${{ steps.tagName.outputs.tag }}
27-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
28-
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
29-
run: |
30-
docker tag kooldev/pdf:$TAGNAME kooldev/pdf:1.0
31-
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
32-
docker push kooldev/pdf:$TAGNAME
33-
docker push kooldev/pdf:1.0
32+
- name: Build and export
33+
uses: docker/build-push-action@v3
34+
with:
35+
load: true
36+
tags: |
37+
kooldev/pdf:${{ steps.tagName.outputs.tag }}
38+
kooldev/pdf:1.0
39+
40+
- name: Build and push image
41+
uses: docker/build-push-action@v3
42+
if: github.ref == 'refs/heads/master' && github.repository == 'kool-dev/pdf'
43+
with:
44+
platforms: linux/amd64,linux/arm64
45+
push: true
46+
tags: |
47+
kooldev/pdf:${{ steps.tagName.outputs.tag }}
48+
kooldev/pdf:1.0

0 commit comments

Comments
 (0)