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:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
if: inputs.publish == 'true'
|
if: inputs.publish == 'true'
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@@ -57,9 +60,9 @@ runs:
|
|||||||
images: ${{ steps.name.outputs.value }}
|
images: ${{ steps.name.outputs.value }}
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=semver,pattern={{version}}
|
type=ref,event=tag
|
||||||
type=semver,pattern=v{{major}}.{{minor}}
|
|
||||||
type=sha,prefix=sha-,format=short
|
type=sha,prefix=sha-,format=short
|
||||||
|
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
|
|||||||
@@ -9,12 +9,15 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
tags: ["v*"]
|
tags: ["v*"]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: git.librete.ch/libretech/runner-image:v1
|
image: git.librete.ch/libretech/runner-image:v1
|
||||||
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -23,4 +26,4 @@ jobs:
|
|||||||
registry: ${{ secrets.REGISTRY }}
|
registry: ${{ secrets.REGISTRY }}
|
||||||
registry_user: ${{ secrets.REGISTRY_USER }}
|
registry_user: ${{ secrets.REGISTRY_USER }}
|
||||||
registry_pass: ${{ secrets.REGISTRY_PASS }}
|
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