Add :nightly tag, dual-push to GHCR, remove pinned dev tags
This commit is contained in:
parent
5edd72b6cf
commit
26ba1bdc0f
2 changed files with 15 additions and 18 deletions
20
.github/workflows/dev-nightly.yml
vendored
20
.github/workflows/dev-nightly.yml
vendored
|
|
@ -58,23 +58,6 @@ jobs:
|
|||
python -m compileall api core database services scripts web_server.py wsgi.py beatport_unified_scraper.py
|
||||
python -m pytest
|
||||
|
||||
- name: Generate version tag
|
||||
if: steps.recent.outputs.skip != 'true'
|
||||
id: version
|
||||
run: |
|
||||
# Read base version from web_server.py
|
||||
BASE=$(python -c "
|
||||
import re
|
||||
with open('web_server.py') as f:
|
||||
m = re.search(r'_SOULSYNC_BASE_VERSION\s*=\s*\"(.+?)\"', f.read())
|
||||
print(m.group(1) if m else 'dev')
|
||||
")
|
||||
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
||||
DATE=$(date -u +%Y%m%d)
|
||||
TAG="${BASE}-dev.${DATE}.${SHORT_SHA}"
|
||||
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
|
||||
echo "Image tag: $TAG"
|
||||
|
||||
- name: Set up QEMU
|
||||
if: steps.recent.outputs.skip != 'true'
|
||||
uses: docker/setup-qemu-action@v4
|
||||
|
|
@ -105,4 +88,5 @@ jobs:
|
|||
COMMIT_SHA=${{ github.sha }}
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository_owner }}/soulsync:dev
|
||||
ghcr.io/${{ github.repository_owner }}/soulsync:${{ steps.version.outputs.tag }}
|
||||
${{ github.event_name == 'schedule' && format('ghcr.io/{0}/soulsync:nightly', github.repository_owner) || '' }}
|
||||
${{ github.event_name == 'schedule' && format('ghcr.io/{0}/soulsync:nightly', github.repository_owner) || '' }}
|
||||
|
|
|
|||
13
.github/workflows/docker-publish.yml
vendored
13
.github/workflows/docker-publish.yml
vendored
|
|
@ -17,6 +17,10 @@ jobs:
|
|||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
|
@ -33,6 +37,13 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
|
|
@ -46,7 +57,9 @@ jobs:
|
|||
COMMIT_SHA=${{ github.sha }}
|
||||
tags: |
|
||||
boulderbadgedad/soulsync:latest
|
||||
ghcr.io/${{ github.repository_owner }}/soulsync:latest
|
||||
${{ inputs.version_tag && format('boulderbadgedad/soulsync:{0}', inputs.version_tag) || '' }}
|
||||
${{ inputs.version_tag && format('ghcr.io/{0}/soulsync:{1}', github.repository_owner, inputs.version_tag) || '' }}
|
||||
|
||||
- name: Announce release to Discord
|
||||
if: success() && inputs.version_tag
|
||||
|
|
|
|||
Loading…
Reference in a new issue