CI / CLI (pull_request) Successful in 16s
CI / Server (pull_request) Successful in 26s
CI / Docker image (pull_request) Successful in 13s
CI / CLI (linux-arm64, static) (pull_request) Successful in 52s
CI / CLI (windows) (pull_request) Successful in 1m15s
CI / CLI (linux-x86-64, static) (pull_request) Successful in 3m43s
The guard matched a 'Release ' prefix that no commit uses any more, so every release rebuilt the development image. Match the (release) scope, which covers the release commit and its merge commit.
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
name: Development image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths-ignore:
|
|
- "docs/**"
|
|
- "**.md"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: git.fristy.net
|
|
|
|
jobs:
|
|
development:
|
|
name: Development image
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
# Releases reach main as a merge commit of the chore(release) branch, so match the scope.
|
|
if: "!contains(github.event.head_commit.message, '(release)')"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Name this build
|
|
id: build
|
|
run: echo "version=0.0.0-dev.$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Log in to the registry
|
|
run: |
|
|
token="${{ secrets.REGISTRY_TOKEN }}"
|
|
[ -n "$token" ] || token="${{ secrets.GITEA_TOKEN }}"
|
|
echo "$token" | docker login "$REGISTRY" -u "${{ github.actor }}" --password-stdin
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
context: .
|
|
push: true
|
|
platforms: linux/amd64
|
|
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}:buildcache
|
|
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}:buildcache,mode=max
|
|
build-args: |
|
|
VERSION=${{ steps.build.outputs.version }}
|
|
tags: ${{ env.REGISTRY }}/${{ github.repository }}:development
|