2024-06-03 18:17:39 +01:00
|
|
|
name: Build and Publish
|
|
|
|
run-name: Build and Publish
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_and_publish:
|
|
|
|
runs-on: [ubuntu-latest]
|
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v4
|
2024-07-02 01:01:51 +01:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2024-06-03 18:17:39 +01:00
|
|
|
- name: Log into forgejo CR
|
2024-07-02 01:01:51 +01:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2024-06-03 18:17:39 +01:00
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: git.i-am.nexus
|
|
|
|
username: nex
|
2024-07-02 01:01:51 +01:00
|
|
|
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
|