mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
nit
This commit is contained in:
parent
4bf1a3e61d
commit
6751b20fca
1 changed files with 11 additions and 15 deletions
26
.github/workflows/ghcr-publish.yml
vendored
26
.github/workflows/ghcr-publish.yml
vendored
|
|
@ -18,6 +18,7 @@ on:
|
||||||
env:
|
env:
|
||||||
# Use docker.io for Docker Hub if empty
|
# Use docker.io for Docker Hub if empty
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -35,20 +36,14 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: 'true'
|
submodules: 'true'
|
||||||
|
|
||||||
- name: Prepare
|
# Extract metadata (tags, labels) for Docker
|
||||||
id: prep
|
# https://github.com/docker/metadata-action
|
||||||
run: |
|
- name: Extract Docker metadata
|
||||||
DOCKER_IMAGE=${REGISTRY}/${{ github.repository_owner }}/sourcebot
|
id: meta
|
||||||
VERSION=latest
|
uses: docker/metadata-action@v5
|
||||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
with:
|
||||||
VERSION=${GITHUB_REF#refs/tags/v}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
fi
|
|
||||||
TAGS="${DOCKER_IMAGE}:${VERSION}"
|
|
||||||
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
|
||||||
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
|
|
||||||
fi
|
|
||||||
echo ::set-output name=tags::${TAGS}
|
|
||||||
|
|
||||||
# Install the cosign tool except on PR
|
# Install the cosign tool except on PR
|
||||||
# https://github.com/sigstore/cosign-installer
|
# https://github.com/sigstore/cosign-installer
|
||||||
|
|
@ -79,7 +74,8 @@ jobs:
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
tags: ${{ steps.prep.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
# Sign the resulting Docker image digest except on PRs.
|
# Sign the resulting Docker image digest except on PRs.
|
||||||
# This will only write to the public Rekor transparency log when the Docker
|
# This will only write to the public Rekor transparency log when the Docker
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue