From 9072622e4f313e352f7a4fad7e41a90a55fc2515 Mon Sep 17 00:00:00 2001 From: Lucas Seidelin Rosenvold Christensen Date: Fri, 18 Sep 2026 15:03:43 +0200 Subject: [PATCH] Add Forgejo Actions pipeline to build and push image Builds the Containerfile and pushes to git.rosenvold.tech's registry on push to master. Co-Authored-By: Claude Sonnet 5 --- .forgejo/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .forgejo/workflows/build.yml diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..7061ed2 --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build and push image + +on: + push: + branches: + - master + +jobs: + build-and-push: + # Needs docker-in-docker: the runner's job container must have access to + # a docker socket (e.g. act_runner configured with + # -v /var/run/docker.sock:/var/run/docker.sock) for buildx to work. + runs-on: docker + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Log in to Forgejo registry + uses: docker/login-action@v3 + with: + registry: git.rosenvold.tech + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Containerfile + push: true + tags: | + git.rosenvold.tech/lucas/rosenvold-core:latest + git.rosenvold.tech/lucas/rosenvold-core:${{ github.sha }}