Skip to content

Commit

Permalink
Test "daily" build using accept-refs
Browse files Browse the repository at this point in the history
  • Loading branch information
me-and committed Nov 13, 2023
1 parent dcc74e8 commit fb9799f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 31 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/build-test-release.yml

This file was deleted.

31 changes: 26 additions & 5 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,34 @@

name: Daily build of latest release

on:
schedule:
# Randomly generated time.
- cron: '46 5 * * *'
on: push

jobs:
# I'm sure there's a more lightweight way to do this, but I'm not sure what
# it is...
decide-branches:
name: Decide branches to test
outputs:
branches: ${{ steps.branches.outputs.branches }}
runs-on: ubuntu-latest
steps:
# Produce a JSON array of the branches that both exist and which I want
# to build regularly if they do exist.
- name: Report branches to build
id: branches
run: |
git ls-remote --heads "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" |
cut -f2 |
grep -e '^refs/heads/main$' -e '^refs/heads/rc$' |
jq -Rrs 'rtrimstr("\n") | split("\n") | @json "branches=\(.)"' >> "$GITHUB_OUTPUT"
build-test:
uses: cygporter/workflows/.github/workflows/build-test.yml@v2
uses: cygporter/workflows/.github/workflows/build-test.yml@accept-ref
needs: decide-branches
strategy:
matrix:
branch: ${{ fromJSON(needs.decide-branches.outputs.branches) }}
fail-fast: false
with:
cygport_file: git.cygport
ref: ${{ matrix.branch }}

0 comments on commit fb9799f

Please sign in to comment.