From c6834c19a7b01614e006f7457386e032b1dd37bd Mon Sep 17 00:00:00 2001 From: irl Date: Sun, 25 May 2025 19:40:37 +0100 Subject: [PATCH] wip --- .forgejo/workflows/build-and-publish.yaml | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .forgejo/workflows/build-and-publish.yaml diff --git a/.forgejo/workflows/build-and-publish.yaml b/.forgejo/workflows/build-and-publish.yaml new file mode 100644 index 0000000..f18430f --- /dev/null +++ b/.forgejo/workflows/build-and-publish.yaml @@ -0,0 +1,40 @@ +name: Build and publish + +on: + push: + branches: + - main + +env: + FORGEJO_HOST: guardianproject.dev + CONTAINER_NAME: sitelen-tu + +jobs: + build-and-push-arch: + runs-on: ubuntu-latest + environment: deploy + steps: + - name: Prepare environment variables + run: | + echo REGISTRY=${{ env.FORGEJO_HOST }} >> $GITHUB_ENV + + - name: Checkout the repo + uses: actions/checkout@v4 + + - name: Login to the registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.PACKAGE_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: ./src + push: true + provenance: false + tags: ${{ env.REGISTRY }}/${{ github.actor }}/${{ env.CONTAINER_NAME }}:latest