Setup registry for buildx + Update CI to current defaults
Some checks are pending
Run Tests on Code / test (push) Waiting to run

This commit is contained in:
Neshura 2024-01-01 20:42:26 +00:00
parent 677b762a71
commit a54baf4b3d

View file

@ -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
@ -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