fix: add buildx setup, match tag/latest behavior, add PR trigger
Some checks failed
build / build (push) Failing after 1s
Some checks failed
build / build (push) Failing after 1s
This commit is contained in:
@@ -32,6 +32,9 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to registry
|
||||
if: inputs.publish == 'true'
|
||||
uses: docker/login-action@v3
|
||||
@@ -57,9 +60,9 @@ runs:
|
||||
images: ${{ steps.name.outputs.value }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern=v{{major}}.{{minor}}
|
||||
type=ref,event=tag
|
||||
type=sha,prefix=sha-,format=short
|
||||
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
|
||||
@@ -9,12 +9,15 @@ on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*"]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.librete.ch/libretech/runner-image:v1
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -23,4 +26,4 @@ jobs:
|
||||
registry: ${{ secrets.REGISTRY }}
|
||||
registry_user: ${{ secrets.REGISTRY_USER }}
|
||||
registry_pass: ${{ secrets.REGISTRY_PASS }}
|
||||
publish: ${{ secrets.PUBLISH_ENABLED }}
|
||||
publish: ${{ github.event_name == 'push' && vars.PUBLISH_ENABLED == 'true' }}
|
||||
|
||||
Reference in New Issue
Block a user