Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
025ff6a42f | |||
a54baf4b3d |
1 changed files with 19 additions and 5 deletions
|
@ -5,7 +5,7 @@ on:
|
|||
push:
|
||||
tags:
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
- '[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
|
||||
- '[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
|
||||
jobs:
|
||||
test:
|
||||
runs-on: docker
|
||||
|
@ -37,10 +37,10 @@ jobs:
|
|||
run: |
|
||||
VERSION=$(cat package.json | grep "version" | sed 's/.*://' | tr -d , | tr -d \" | tr -d " " )
|
||||
if test $VERSION != "${{ github.ref_name }}"; then
|
||||
echo "Expected Version is: '${{ github.ref_name }}' actual Version is: '$VERSION'";
|
||||
exit 1
|
||||
echo "Expected Version is: '${{ github.ref_name }}' actual Version is: '$VERSION'";
|
||||
exit 1
|
||||
else
|
||||
echo "Version is: '$VERSION'";
|
||||
echo "Version is: '$VERSION'";
|
||||
fi
|
||||
|
||||
build:
|
||||
|
@ -51,6 +51,10 @@ jobs:
|
|||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
config-inline: |
|
||||
[registry."docker.io"]
|
||||
mirrors = ["https://docker-cache.neshweb.net"]
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
|
@ -58,12 +62,22 @@ jobs:
|
|||
registry: forgejo.neshweb.net
|
||||
username: ${{ secrets.FORGEJO_USERNAME }}
|
||||
password: ${{ secrets.FORGEJO_TOKEN }}
|
||||
-
|
||||
name: Determine Docker tags
|
||||
id: tags
|
||||
run: |
|
||||
if echo ${{ github.ref_name }} | grep -qi '\-rc' ; then
|
||||
echo latest=forgejo.neshweb.net/neshweb-sites/${{ github.event.repository.name }}:preview >> $GITHUB_OUTPUT;
|
||||
else
|
||||
echo latest=forgejo.neshweb.net/neshweb-sites/${{ github.event.repository.name }}:latest >> $GITHUB_OUTPUT;
|
||||
fi
|
||||
echo version=forgejo.neshweb.net/neshweb-sites/${{ github.event.repository.name }}:${{ github.ref_name }} >> $GITHUB_OUTPUT;
|
||||
-
|
||||
name: Push to Package Registry
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: true
|
||||
tags: forgejo.neshweb.net/neshweb-sites/readyornot:${{ github.ref_name }}, forgejo.neshweb.net/neshweb-sites/readyornot:latest
|
||||
tags: ${{ steps.tags.outputs.version }}, ${{ steps.tags.outputs.latest }}
|
||||
|
||||
release:
|
||||
needs: build
|
||||
|
|
Reference in a new issue