mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix the wrong tags for the scheduled nightly build
* simplified the checkout process * fixed the wrong tags for the scheduled builds (used to be `release`, now it should be `staging`) * upgraded the `checkout` action to v4.1.2 (no warnings anymore)
This commit is contained in:
24
.github/workflows/docker-publish.yml
vendored
24
.github/workflows/docker-publish.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
## Workaround for GitHub repo names containing uppercase characters
|
# Workaround for GitHub repo names containing uppercase characters
|
||||||
- name: Set lowercase repo name
|
- name: Set lowercase repo name
|
||||||
run: |
|
run: |
|
||||||
echo "IMAGE_NAME=${REPO,,}" >> ${GITHUB_ENV}
|
echo "IMAGE_NAME=${REPO,,}" >> ${GITHUB_ENV}
|
||||||
@@ -33,23 +33,25 @@ jobs:
|
|||||||
# does not support logical AND/OR operations on triggers
|
# does not support logical AND/OR operations on triggers
|
||||||
# It's currently not possible to have `branches` under the `schedule` trigger
|
# It's currently not possible to have `branches` under the `schedule` trigger
|
||||||
- name: Checkout the release branch (on release)
|
- name: Checkout the release branch (on release)
|
||||||
if: ${{ github.event_name == 'release' }}
|
if: ${{ github.event_name == 'release' || github.event_name == 'push' }}
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4.1.2
|
||||||
with:
|
|
||||||
ref: "release"
|
|
||||||
|
|
||||||
- name: Checkout the release branch (on push)
|
|
||||||
if: ${{ github.event_name == 'push' }}
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
with:
|
||||||
ref: "release"
|
ref: "release"
|
||||||
|
|
||||||
- name: Checkout the staging branch
|
- name: Checkout the staging branch
|
||||||
if: ${{ github.event_name == 'schedule' }}
|
if: ${{ github.event_name == 'schedule' }}
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4.1.2
|
||||||
with:
|
with:
|
||||||
ref: "staging"
|
ref: "staging"
|
||||||
|
|
||||||
|
# Get current branch name
|
||||||
|
# This is also part of the workaround for Actions not allowing logical
|
||||||
|
# AND/OR operators on triggers
|
||||||
|
# Otherwise the action triggered by schedule always has ref_name = release
|
||||||
|
- name: Get the current branch name
|
||||||
|
run: |
|
||||||
|
echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
# Setting up QEMU for multi-arch image build
|
# Setting up QEMU for multi-arch image build
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
@@ -62,7 +64,7 @@ jobs:
|
|||||||
id: metadata
|
id: metadata
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
tags: ${{ github.ref_name }}
|
tags: ${{ env.BRANCH_NAME }}
|
||||||
|
|
||||||
# Login into package repository as the person who created the release
|
# Login into package repository as the person who created the release
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
|
Reference in New Issue
Block a user