This commit is contained in:
parent
b7cf5a5084
commit
c6834c19a7
1 changed files with 40 additions and 0 deletions
40
.forgejo/workflows/build-and-publish.yaml
Normal file
40
.forgejo/workflows/build-and-publish.yaml
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue