mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 08:47:42 -05:00
chore(ci): trigger a mirror when a release is publish
Notify https://code.forgejo.org/forgejo/forgejo that a new release was
published by setting the trigger label to
https://code.forgejo.org/forgejo/forgejo/issues/5.
It is only ever useful when a stable release is published, the
experimental releases are not mirrored. But it is triggered in all
cases. This will waste a few mirror check daily, when experimental
releases are built. This is an improvement compared to the current
situation where mirrors are checked hourly:
* Instead of being checked 24 times per day it will be down to less
than 5
* The mirror happens immediately after the release is published
instead of waiting for the next run of the cron job.
If a mirror operation is in progress, as evidenced by the presence of
the trigger label on the issure, it means two releases are being
published. Wait up to 1h for the mirror to complete and remove the
trigger label.
(cherry picked from commit 7492330721
)
Conflicts:
.forgejo/workflows/publish-release.yml
trivial context conflict
This commit is contained in:
parent
b94044407f
commit
c565439eb9
1 changed files with 18 additions and 1 deletions
|
@ -59,8 +59,25 @@ jobs:
|
|||
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
verbose: ${{ vars.VERBOSE }}
|
||||
|
||||
- name: get trigger mirror issue
|
||||
id: mirror
|
||||
uses: https://code.forgejo.org/infrastructure/issue-action/get@v1.1.0
|
||||
with:
|
||||
forgejo: https://code.forgejo.org
|
||||
repository: forgejo/forgejo
|
||||
labels: mirror-trigger
|
||||
|
||||
- name: upgrade v*.next.forgejo.org (k8s)
|
||||
- name: trigger the mirror
|
||||
uses: https://code.forgejo.org/infrastructure/issue-action/set@v1.1.0
|
||||
with:
|
||||
forgejo: https://code.forgejo.org
|
||||
repository: forgejo/forgejo
|
||||
token: ${{ secrets.LABEL_ISSUE_FORGEJO_MIRROR_TOKEN }}
|
||||
numbers: ${{ steps.mirror.outputs.numbers }}
|
||||
label-wait-if-exists: 3600
|
||||
label: trigger
|
||||
|
||||
- name: upgrade v*.next.forgejo.org
|
||||
uses: https://code.forgejo.org/infrastructure/next-digest@v1.1.0
|
||||
with:
|
||||
url: https://placeholder:${{ secrets.TOKEN_NEXT_DIGEST }}@code.forgejo.org/infrastructure/next-digest
|
||||
|
|
Loading…
Reference in a new issue