Skip to content

Commit b349b00

Browse files
committed
Restore building of named branches (keep master->nightly relationship)
Signed-off-by: Adam Warner <[email protected]>
1 parent d534b22 commit b349b00

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.github/workflows/ftl-build-publish.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ on:
66
- cron: "30 1 * * 0"
77
push:
88
branches:
9-
- 'master'
9+
- '**'
10+
workflow_dispatch:
1011
release:
1112
types: [published]
1213

@@ -60,7 +61,8 @@ jobs:
6061
latest=${{ startsWith(github.ref, 'refs/tags/') }}
6162
tags: |
6263
type=schedule,pattern=nightly
63-
type=raw,value=nightly,enable=${{ github.event_name == 'push' }}
64+
type=raw,value=nightly,enable=${{ github.ref == 'refs/heads/master' }}
65+
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/master' }}
6466
type=ref,event=tag
6567
6668
- &login-dockerhub
@@ -96,11 +98,11 @@ jobs:
9698
timeout_minutes: 60
9799
command: |
98100
docker buildx build \
99-
--context ftl-build \
100101
--platform ${{ matrix.platform }} \
101102
--target build \
102103
--label "${{ steps.meta.outputs.labels }}" \
103-
--output "type=image,name=${{ env.DOCKER_REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true"
104+
--output "type=image,name=${{ env.DOCKER_REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true" \
105+
ftl-build
104106
105107
- name: Export digests
106108
run: |

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ All images are pushed to both Docker Hub (`pihole/ftl-build`) and GHCR (`ghcr.io
1515

1616
## How does it get uploaded?
1717

18-
- GitHub Actions (`ftl-build.yml`):
19-
- Every `pull_request` event triggers a build (but does not push)
20-
- Every `workflow_dispatch` event triggers a build of the branch it is run against, and uploads a branch-based tag
21-
- Every `tag` event (e.g `v1`) triggers a build and uploads both `${{matrix.ARCH}}` and `v1-${{matrix.ARCH}}` tags
22-
- Schedule: 1:30am UTC every Sunday a build is triggered and a `${{matrix.ARCH}}` tag is uploaded
18+
- GitHub Actions:
19+
- `ftl-build-test.yml`: every `pull_request` event triggers a build (but does not push)
20+
- `ftl-build-publish.yml`:
21+
- Every branch `push` publishes the branch name as a tag (except `master`)
22+
- Every `workflow_dispatch` publishes the branch name as a tag (except `master`)
23+
- Every push to `master` publishes the `nightly` tag
24+
- Schedule: 1:30am UTC every Sunday a build is triggered and the `nightly` tag is published
25+
- Every published GitHub `release` publishes the release tag

0 commit comments

Comments
 (0)