Repository navigation
68 lines (60 loc) · 2.39 KB
/
Copy pathsync.yml
File metadata and controls
68 lines (60 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Sync FreeBSD branches
# Hourly: follow Remi Collet's backport branches (5.6, 7.4, 8.1) and the official
# php-src release tags (8.2 to 8.5), rebuild the freebsd/<target> branches,
# mirror the upstream refs and publish ready-to-build tarballs as releases.
on:
schedule:
- cron: '23 * * * *'
workflow_dispatch:
inputs:
force:
description: 'Rebuild and re-release even if upstream did not change'
type: boolean
default: false
targets:
description: 'Space-separated targets, e.g. "7.4 8.4" (empty = all)'
type: string
default: ''
notes_only:
description: 'Only rewrite the notes of the current releases (no rebuild)'
type: boolean
default: false
permissions:
contents: write
concurrency:
group: sync-freebsd
cancel-in-progress: false
jobs:
sync:
runs-on: ubuntu-24.04
timeout-minutes: 180
steps:
# SYNC_TOKEN: fine-grained token for this repository (it may serve other
# repositories of the owner too), with "Contents" and "Workflows" read/write. GITHUB_TOKEN may not push upstream history that touches
# .github/workflows, so without SYNC_TOKEN some updates can be rejected.
# No fixed ref: scheduled runs use the default branch, whatever its name.
- name: Check out the default branch
uses: actions/checkout@v5
with:
fetch-depth: 1
token: ${{ secrets.SYNC_TOKEN || github.token }}
- name: Token check
env:
HAS_SYNC_TOKEN: ${{ secrets.SYNC_TOKEN != '' }}
run: |
if [ "$HAS_SYNC_TOKEN" != "true" ]; then
echo "::warning::Secret SYNC_TOKEN is not set; pushes run with GITHUB_TOKEN and may be rejected when upstream history changes .github/workflows."
fi
# zstd and lzip: release files of the libraries of the bundled curl
# (tools/curl-sources.sh); python3 is there already
- name: Install generators
run: |
sudo apt-get update -q
sudo apt-get install -y -q autoconf bison re2c zstd lzip
- name: Sync branches and publish tarballs
env:
GH_TOKEN: ${{ secrets.SYNC_TOKEN || github.token }}
FORCE_FLAG: ${{ inputs.force && '--force' || '' }}
NOTES_FLAG: ${{ inputs.notes_only && '--notes' || '' }}
TARGETS: ${{ inputs.targets }}
run: sh tools/sync.sh $NOTES_FLAG $FORCE_FLAG $TARGETS