Files
tunnel-please-frontend/.gitea/workflows/build.yml
bagas 05f442fea1
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 6m51s
Update .gitea/workflows/build.yml
2026-01-01 06:37:47 +00:00

67 lines
1.7 KiB
YAML

name: Docker Build and Push
on:
push:
branches:
- main
- staging
paths:
- 'app/**'
- 'pages/**'
- 'components/**'
- 'lib/**'
- 'public/**'
- '**/*.js'
- '**/*.jsx'
- '**/*.ts'
- '**/*.tsx'
- 'next.config.js'
- 'next.config.mjs'
- 'package.json'
- 'package-lock.json'
- 'pnpm-lock.yaml'
- 'yarn.lock'
- 'tsconfig.json'
- 'jsconfig.json'
- 'Dockerfile'
- 'Dockerfile.*'
- '.dockerignore'
- '.gitea/workflows/build.yml'
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
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 }}/tunnel-please-frontend:latest
platforms: linux/amd64,linux/arm64
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 }}/tunnel-please-frontend:staging
platforms: linux/amd64,linux/arm64
if: github.ref == 'refs/heads/staging'