Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build-pr.yml #1423

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
platform:
- linux/amd64
- linux/arm64
# - linux/arm/v7
# - linux/arm/v7 # Uncomment if you need ARMv7 support
steps:
- name: 📥 Checkout the git repo
uses: actions/checkout@v4
Expand All @@ -36,13 +36,29 @@ jobs:
type=sha,prefix=sha-
type=ref,event=branch
type=ref,event=pr

- name: 🏗️ Build Docker image
uses: docker/build-push-action@v5
with:
context: web/
platforms: ${{ matrix.platform }}
push: false
push: false # Only build, don't push to Docker Hub yet
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: 🔐 Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: 📤 Push Docker image to Docker Hub
uses: docker/build-push-action@v5
with:
context: web/
platforms: ${{ matrix.platform }}
push: true # Push to Docker Hub
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
Loading