From 31fb8d380bc1872492363de44019e0126ae5ba1c Mon Sep 17 00:00:00 2001 From: bagas Date: Sun, 22 Jun 2025 16:42:09 +0700 Subject: [PATCH] update: add gitea action --- .gitea/workflows/build.yml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..40a0b4f --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,48 @@ +name: Docker Build and Push + +on: + push: + branches: + - main + - staging + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + 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 }}/filekeeper: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 }}/filekeeper:staging + platforms: linux/amd64,linux/arm64 + if: github.ref == 'refs/heads/staging' \ No newline at end of file