ci: rename to forgejo + correct oci registry and image details
All checks were successful
Docker CI / release (push) Successful in 2m51s

This commit is contained in:
Nicola Zambello 2024-05-21 21:21:03 +03:00
parent 542b8e2414
commit 602417e2c6
Signed by: nzambello
GPG key ID: 56E4A92C2C1E50BA

View file

@ -7,11 +7,13 @@ on:
workflow_dispatch: workflow_dispatch:
env: env:
node-version: 18.x node-version: 20.x
jobs: jobs:
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
permissions: permissions:
contents: read contents: read
packages: write packages: write
@ -25,9 +27,9 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: | images: |
nzambello/nzambello.dev git.nzambello.dev/nzambello/nzambello.dev
labels: | labels: |
org.label-schema.docker.cmd=docker run -d -p 8080:8080 nzambello/nzambello.dev:latest org.label-schema.docker.cmd=docker run -d -p 8080:8080 git.nzambello.dev/nzambello/nzambello.dev:latest
flavor: latest=false flavor: latest=false
tags: | tags: |
type=ref,event=branch type=ref,event=branch
@ -43,8 +45,9 @@ jobs:
- name: Login to Container Registry - name: Login to Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} registry: git.nzambello.dev
password: ${{ secrets.DOCKERHUB_TOKEN }} username: nzambello
password: ${{ secrets.ACTIONS_TOKEN }}
- name: Build and push - name: Build and push
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
@ -52,5 +55,13 @@ jobs:
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
file: Dockerfile file: Dockerfile
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: |
git.nzambello.dev/nzambello/nccfiore.it:latest
labels: $${{ steps.meta.outputs.labels }} labels: $${{ steps.meta.outputs.labels }}
- name: Deploy
uses: darnfish/watchtower-update@v3.2
with:
url: https://watchtower.nzambello.dev/v1/update
api_token: '${{ secrets.WATCHTOWER_API_TOKEN }}'
images: git.nzambello.dev/nzambello/nzambello.dev