Add Forgejo Actions pipeline to build and push image
Some checks failed
Build and push image / build-and-push (push) Failing after 1m6s
Some checks failed
Build and push image / build-and-push (push) Failing after 1m6s
Builds the Containerfile and pushes to git.rosenvold.tech's registry on push to master. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
9e1a7021e1
commit
9072622e4f
1 changed files with 36 additions and 0 deletions
36
.forgejo/workflows/build.yml
Normal file
36
.forgejo/workflows/build.yml
Normal file
|
|
@ -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 }}
|
||||
Loading…
Add table
Reference in a new issue