update: native builder for action

This commit is contained in:
2025-12-03 21:47:03 +07:00
parent 82050a738f
commit 6ddc2baad6

View File

@ -8,38 +8,36 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest
runs-on: [linux, ${{ matrix.arch }}]
strategy:
matrix:
arch: [amd64, arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
- uses: docker/login-action@v3
with:
registry: git.fossy.my.id
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image for main
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:latest
platforms: linux/amd64,linux/arm64
- name: Build & Push (main)
if: github.ref == 'refs/heads/main'
- name: Build and push Docker image for staging
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:staging
platforms: linux/amd64,linux/arm64
if: github.ref == 'refs/heads/staging'
tags: git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:${{ matrix.arch }}
platforms: linux/${{ matrix.arch }}
- name: Build & Push (staging)
if: github.ref == 'refs/heads/staging'
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:staging-${{ matrix.arch }}
platforms: linux/${{ matrix.arch }}