ci: publish Docker container image to Gitea Package Registry in parallel
This commit is contained in:
@@ -23,17 +23,34 @@ jobs:
|
||||
if [[ "$BRANCH" == develop* ]]; then
|
||||
# Sanitise branch name for tag: replace slashes with dashes
|
||||
SAFE_BRANCH=$(echo "$BRANCH" | tr '/' '-')
|
||||
echo "tags=reg.i3omb.com/sofarr:${SAFE_BRANCH}" >> $GITHUB_OUTPUT
|
||||
echo "Building develop image ${SAFE_BRANCH} (version ${VERSION})"
|
||||
TAGS="reg.i3omb.com/sofarr:${SAFE_BRANCH}"
|
||||
TAGS="${TAGS},git.i3omb.com/gandalf/sofarr:${SAFE_BRANCH}"
|
||||
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
|
||||
echo "Building develop image tags: ${TAGS}"
|
||||
else
|
||||
RELEASE_NAME=${BRANCH#release/}
|
||||
|
||||
# Primary registry tags
|
||||
TAGS="reg.i3omb.com/sofarr:${VERSION}"
|
||||
TAGS="${TAGS},reg.i3omb.com/sofarr:${RELEASE_NAME}"
|
||||
TAGS="${TAGS},reg.i3omb.com/sofarr:latest"
|
||||
|
||||
# Gitea package registry tags
|
||||
TAGS="${TAGS},git.i3omb.com/gandalf/sofarr:${VERSION}"
|
||||
TAGS="${TAGS},git.i3omb.com/gandalf/sofarr:${RELEASE_NAME}"
|
||||
TAGS="${TAGS},git.i3omb.com/gandalf/sofarr:latest"
|
||||
|
||||
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
|
||||
echo "Building release image ${VERSION} from branch ${BRANCH}"
|
||||
echo "Building release image tags: ${TAGS}"
|
||||
fi
|
||||
|
||||
- name: Log into Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.i3omb.com
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user