Fix CI
All checks were successful
Build and Publish / build_and_publish (push) Successful in 1m0s

This commit is contained in:
Nexus 2024-07-02 01:01:51 +01:00
parent 201a605057
commit fd00b98346
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -5,21 +5,33 @@ on: [push]
jobs:
build_and_publish:
runs-on: [ubuntu-latest]
permissions:
contents: read
packages: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: git.i-am.nexus/nex/link-elongater
- name: Log into forgejo CR
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
registry: git.i-am.nexus
username: nex
password: ${{ secrets.CR_TOKEN }}
- name: Build Docker image
run: |
docker build -t git.i-am.nexus/nex/link-elongater:latest .
- name: Push to forgejo CR
run: |
docker push -a git.i-am.nexus/nex/link-elongater
password: ${{ secrets.CR_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=git.i-am.nexus/nex/link-elongater:master
cache-to: type=inline