v1.0.0 #1

Merged
jamie merged 5 commits from v1.0.0 into master 2026-01-08 19:55:51 +00:00
2 changed files with 46 additions and 47 deletions
Showing only changes of commit 8f585dc092 - Show all commits
+46
View File
@@ -0,0 +1,46 @@
name: Release
on:
pull_request:
branches:
- master
types: [closed]
jobs:
release:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'v')
runs-on: build-htz-01
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract Version
id: get_version
run: echo "VERSION=${{ github.head_ref }}" >> $GITHUB_OUTPUT
- name: Generate Changelog
id: changelog
uses: https://github.com/metcalfc/changelog-generator@v4.6.2
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
docker build -t cr.jdbnet.co.uk/public/encoder:$VERSION \
-t cr.jdbnet.co.uk/public/encoder:latest \
--build-arg VERSION=$VERSION \
.
docker push cr.jdbnet.co.uk/public/encoder:$VERSION
docker push cr.jdbnet.co.uk/public/encoder:latest
- name: Create Gitea Release
uses: https://gitea.com/actions/gitea-release-action@v1
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
name: ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
-47
View File
@@ -1,47 +0,0 @@
name: CI
on:
push:
branches: [ master ]
jobs:
build-and-push:
name: Build and Push
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/jdb-net/encoder:${{ github.sha }}
ghcr.io/jdb-net/encoder:latest
deploy:
name: Deploy
needs: build-and-push
runs-on: [ k3s-media-lan-01 ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Apply manifests
run: |
sudo kubectl replace -f deployment.yml --grace-period=60 --force