From 1a5dd85aa58dd58630918b2439b2ad2845944fd0 Mon Sep 17 00:00:00 2001 From: Mirko Milovanovic Date: Sun, 9 Feb 2025 14:15:59 +0100 Subject: [PATCH] feat: add GitHub Actions workflow for building and pushing Docker images --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e09d163 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: Build and Push Docker Image + +on: [push] + +env: + REGISTRY_URL: gitea.kobim.cloud + +jobs: + build: + runs-on: ubuntu-latest + #container: + #image: docker + #options: --privileged + + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.4.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3.9.0 + + - name: Log in to Docker registry + uses: docker/login-action@v3.3.0 + with: + registry: ${{ env.REGISTRY_URL }} + username: ${{ github.actor }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6.13.0 + with: + context: . + push: true + tags: ${{ env.REGISTRY_URL }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest + platforms: | + linux/amd64 + linux/arm64 \ No newline at end of file