update: native builder for action
This commit is contained in:
@ -8,38 +8,36 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: [linux, ${{ matrix.arch }}]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [amd64, arm64]
|
||||||
|
|
||||||
steps:
|
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:
|
with:
|
||||||
registry: git.fossy.my.id
|
registry: git.fossy.my.id
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push Docker image for main
|
- name: Build & Push (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
|
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
|
|
||||||
- name: Build and push Docker image for staging
|
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:${{ matrix.arch }}
|
||||||
git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:staging
|
platforms: linux/${{ matrix.arch }}
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
|
- name: Build & Push (staging)
|
||||||
if: github.ref == 'refs/heads/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 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user