chore: add new workflows (changelog, automatic releases)
All checks were successful
Update changelog / changelog (push) Successful in 26s
All checks were successful
Update changelog / changelog (push) Successful in 26s
Docker images will now be built on every release
This commit is contained in:
58
.gitea/workflows/01_docker.yaml
Normal file
58
.gitea/workflows/01_docker.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
# Credits: https://www.vanmeeuwen.dev/blog/automating-docker-builds-with-gitea-actions
|
||||
# https://gitea.com/gitea/runner-images/src/branch/main/.gitea/workflows/release.yaml
|
||||
|
||||
name: Build and push Docker image
|
||||
run-name: Build ${{ github.ref_name }} image
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: gitea.7o7.cx
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Set outputs
|
||||
id: vars
|
||||
env:
|
||||
BRANCH_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
#echo branch_name="$BRANCH_NAME" | tee -a $GITHUB_OUTPUT
|
||||
#echo short_hash=$(git rev-parse --short HEAD) | tee -a $GITHUB_OUTPUT
|
||||
echo current_tag=$GITHUB_REF_NAME | tee -a $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
# Change when working on a different branch!
|
||||
tags: |
|
||||
gitea.7o7.cx/kittyteam/kittybe:master-${{ steps.vars.outputs.current_tag }}
|
||||
gitea.7o7.cx/kittyteam/kittybe:latest
|
||||
|
||||
- name: Log out from registry
|
||||
if: always()
|
||||
run: docker logout gitea.7o7.cx
|
||||
Reference in New Issue
Block a user