From edd4875381d3f70236417f54dca335a0894fd96a Mon Sep 17 00:00:00 2001 From: Daniele Viti Date: Wed, 20 Nov 2024 17:52:06 +0100 Subject: [PATCH] Create build.yaml --- .github/workflows/build.yaml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..e7c4af4 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,38 @@ +name: Docker Build + +on: + push: + +env: + REGISTRY: ghcr.io + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push Backend Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: Dockerfile + push: true + tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/fdroid-reposerver:latest