Skip to content

Commit a187dc3

Browse files
committed
feature: added optimization to gha workflow
1 parent 493c33c commit a187dc3

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,29 @@ jobs:
2323
run: npm run test:integration
2424

2525
build:
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-latest
2727
steps:
2828
- name: Checkout
2929
uses: actions/checkout@v4
3030

31-
- name: Log in to Docker Hub
32-
uses: docker/login-action@v2
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Login to Docker Hub
38+
uses: docker/login-action@v3
3339
with:
3440
username: ${{ secrets.DOCKER_HUB_USERNAME }}
3541
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
3642

3743
- name: Build and push app Docker image
38-
uses: docker/build-push-action@v2
44+
uses: docker/build-push-action@v5
3945
with:
4046
context: .
41-
tags: rerorerio8/queue-manager
47+
tags: rerorerio8/queue-manager:latest
48+
push: ${{ github.event_name != 'pull_request' }}
49+
cache-from: type=gha
50+
cache-to: type=gha,mode=max
51+
platforms: linux/amd64,linux/arm64,linux/arm/v7

0 commit comments

Comments
 (0)