This commit is contained in:
parent
201a605057
commit
fd00b98346
1 changed files with 22 additions and 10 deletions
|
@ -5,21 +5,33 @@ on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
build_and_publish:
|
build_and_publish:
|
||||||
runs-on: [ubuntu-latest]
|
runs-on: [ubuntu-latest]
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Log into forgejo CR
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: git.i-am.nexus
|
registry: git.i-am.nexus
|
||||||
username: nex
|
username: nex
|
||||||
password: ${{ secrets.CR_TOKEN }}
|
password: ${{ secrets.CR_PASSWORD }}
|
||||||
- name: Build Docker image
|
|
||||||
run: |
|
- name: Build and push
|
||||||
docker build -t git.i-am.nexus/nex/link-elongater:latest .
|
uses: docker/build-push-action@v5
|
||||||
- name: Push to forgejo CR
|
with:
|
||||||
run: |
|
context: .
|
||||||
docker push -a git.i-am.nexus/nex/link-elongater
|
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
|
Loading…
Reference in a new issue