drop-in-url-previews/.gitea/workflows/publish-docker.yaml

39 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2024-06-27 18:00:27 +01:00
name: Build and Publish
run-name: Build and Publish
2024-04-22 16:45:41 +01:00
on: [push]
jobs:
build_and_publish:
2024-06-27 18:00:27 +01:00
runs-on: [ubuntu-latest]
2024-04-22 16:45:41 +01:00
steps:
2024-06-27 18:00:27 +01:00
- name: Check out repository code
2024-04-22 16:45:41 +01:00
uses: actions/checkout@v4
2024-05-29 08:49:23 +01:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
2024-06-27 18:00:27 +01:00
- name: Docker meta
2024-05-29 08:49:23 +01:00
id: meta
uses: docker/metadata-action@v5
with:
images: git.i-am.nexus/nex/drop-in-url-previews
2024-06-27 18:00:27 +01:00
- 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_PASSWORD }}
- name: Build and push
2024-05-29 09:19:40 +01:00
uses: docker/build-push-action@v5
with:
context: .
2024-06-27 18:00:27 +01:00
push: ${{ github.event_name != 'pull_request' }}
2024-06-27 18:16:13 +01:00
platforms: linux/amd64,linux/arm64
2024-05-29 09:19:40 +01:00
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2024-06-27 18:00:27 +01:00
cache-from: type=registry,ref=git.i-am.nexus/nex/drop-in-url-previews:master
cache-to: type=inline