mirror of
https://github.com/chrisbenincasa/tunarr.git
synced 2026-04-18 09:03:35 -04:00
chore: use PAT for semantic release
should ensure that tag push events are fired as expected for follow-up release workflows
This commit is contained in:
22
.github/workflows/build-and-push-docker.yml
vendored
22
.github/workflows/build-and-push-docker.yml
vendored
@@ -2,8 +2,8 @@ name: Build & Push Docker
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [created]
|
||||
#release:
|
||||
# types: [created]
|
||||
push:
|
||||
tags:
|
||||
- v[0-9]+.[0-9]+.[0-9]+*
|
||||
@@ -70,8 +70,6 @@ jobs:
|
||||
chrisbenincasa/tunarr
|
||||
ghcr.io/chrisbenincasa/tunarr
|
||||
tags: |
|
||||
# Update edge tag on the scheduled build
|
||||
type=schedule,pattern=edge
|
||||
# Update version tags on proper releases
|
||||
type=semver,pattern={{version}}
|
||||
# Update edge tag when we manually trigger the release
|
||||
@@ -102,22 +100,6 @@ jobs:
|
||||
restore-keys: | # Check for previous SHA in cache
|
||||
${{ runner.os }}-edge-build-
|
||||
|
||||
- name: Check for HEAD commit changes
|
||||
run: |
|
||||
git fetch origin main
|
||||
HEAD_SHA=$(git rev-parse HEAD)
|
||||
|
||||
if [[ -z "$PREVIOUS_HEAD_SHA" ]]; then
|
||||
echo "No previous HEAD SHA found (first run). Building image."
|
||||
elif [[ "$HEAD_SHA" != "$PREVIOUS_HEAD_SHA" ]]; then
|
||||
echo "Head commit has changed. Building and pushing image."
|
||||
else
|
||||
echo "Head commit hasn't changed. Skipping build."
|
||||
exit 0 # Exit without pushing the image
|
||||
fi
|
||||
echo "PREVIOUS_HEAD_SHA=$HEAD_SHA" >> previous_head_sha # Save current SHA for next run
|
||||
if: github.event_name == 'schedule'
|
||||
|
||||
- name: Generate Version Number
|
||||
run: |
|
||||
echo "TUNARR_VERSION=${{github.ref_name}}" >> $GITHUB_ENV
|
||||
|
||||
Reference in New Issue
Block a user