2023-06-14 14:32:20 +03:00
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
#
|
2024-08-26 14:29:10 +03:00
|
|
|
# See also https://forgejo.org/docs/next/contributor/release/#stable-release-process
|
2023-06-14 14:32:20 +03:00
|
|
|
#
|
|
|
|
# https://codeberg.org/forgejo-experimental/forgejo
|
|
|
|
#
|
|
|
|
# Copies a release from codeberg.org/forgejo-integration to codeberg.org/forgejo-experimental
|
|
|
|
#
|
2023-12-28 19:23:09 +03:00
|
|
|
# vars.ROLE: forgejo-experimental
|
|
|
|
# vars.FORGEJO: https://codeberg.org
|
|
|
|
# vars.FROM_OWNER: forgejo-integration
|
|
|
|
# vars.TO_OWNER: forgejo-experimental
|
|
|
|
# vars.REPO: forgejo
|
|
|
|
# vars.DOER: forgejo-experimental-ci
|
|
|
|
# secrets.TOKEN: <generated from codeberg.org/forgejo-experimental-ci>
|
2023-06-14 14:32:20 +03:00
|
|
|
#
|
2023-12-28 19:23:09 +03:00
|
|
|
# http://private.forgejo.org/forgejo/forgejo
|
2023-06-14 14:32:20 +03:00
|
|
|
#
|
|
|
|
# Copies & sign a release from codeberg.org/forgejo-integration to codeberg.org/forgejo
|
|
|
|
#
|
2023-12-28 19:23:09 +03:00
|
|
|
# vars.ROLE: forgejo-release
|
|
|
|
# vars.FORGEJO: https://codeberg.org
|
|
|
|
# vars.FROM_OWNER: forgejo-integration
|
|
|
|
# vars.TO_OWNER: forgejo
|
|
|
|
# vars.REPO: forgejo
|
|
|
|
# vars.DOER: release-team
|
|
|
|
# secrets.TOKEN: <generated from codeberg.org/release-team>
|
|
|
|
# secrets.GPG_PRIVATE_KEY: <XYZ>
|
|
|
|
# secrets.GPG_PASSPHRASE: <ABC>
|
2023-06-14 14:32:20 +03:00
|
|
|
#
|
|
|
|
name: Pubish release
|
|
|
|
|
2023-12-19 17:35:06 +03:00
|
|
|
on:
|
2023-06-14 14:32:20 +03:00
|
|
|
push:
|
|
|
|
tags: 'v*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: self-hosted
|
2023-12-28 19:23:09 +03:00
|
|
|
if: vars.DOER != '' && vars.FORGEJO != '' && vars.TO_OWNER != '' && vars.FROM_OWNER != '' && secrets.TOKEN != ''
|
2023-06-14 14:32:20 +03:00
|
|
|
steps:
|
2024-09-30 16:08:26 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-06-14 14:32:20 +03:00
|
|
|
|
2023-12-28 19:23:09 +03:00
|
|
|
- name: copy & sign
|
2024-04-12 13:19:15 +03:00
|
|
|
uses: https://code.forgejo.org/forgejo/forgejo-build-publish/publish@v5
|
2023-06-14 14:32:20 +03:00
|
|
|
with:
|
2024-03-02 12:39:25 +03:00
|
|
|
from-forgejo: ${{ vars.FORGEJO }}
|
|
|
|
to-forgejo: ${{ vars.FORGEJO }}
|
2023-12-28 19:23:09 +03:00
|
|
|
from-owner: ${{ vars.FROM_OWNER }}
|
|
|
|
to-owner: ${{ vars.TO_OWNER }}
|
|
|
|
repo: ${{ vars.REPO }}
|
|
|
|
release-notes: "See https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#{ANCHOR}"
|
2024-03-02 12:39:25 +03:00
|
|
|
ref-name: ${{ github.ref_name }}
|
|
|
|
sha: ${{ github.sha }}
|
|
|
|
from-token: ${{ secrets.TOKEN }}
|
|
|
|
to-doer: ${{ vars.DOER }}
|
|
|
|
to-token: ${{ secrets.TOKEN }}
|
2023-06-14 14:32:20 +03:00
|
|
|
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
|
|
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
2023-12-28 19:23:09 +03:00
|
|
|
verbose: ${{ vars.VERBOSE }}
|
2023-08-21 17:38:29 +03:00
|
|
|
|
2024-11-13 14:30:25 +03:00
|
|
|
- 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: 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
|
|
|
|
|
2024-07-01 13:52:59 +03:00
|
|
|
- name: upgrade v*.next.forgejo.org
|
2024-11-01 13:40:13 +03:00
|
|
|
uses: https://code.forgejo.org/infrastructure/next-digest@v1.1.0
|
2024-10-30 17:46:24 +03:00
|
|
|
with:
|
|
|
|
url: https://placeholder:${{ secrets.TOKEN_NEXT_DIGEST }}@code.forgejo.org/infrastructure/next-digest
|
|
|
|
ref_name: '${{ github.ref_name }}'
|
|
|
|
image: 'codeberg.org/forgejo-experimental/forgejo'
|
2024-10-31 14:24:40 +03:00
|
|
|
tag_suffix: '-rootless'
|
2024-10-30 17:46:24 +03:00
|
|
|
|
2023-08-21 17:38:29 +03:00
|
|
|
- name: set up go for the DNS update below
|
2023-12-28 19:23:09 +03:00
|
|
|
if: vars.ROLE == 'forgejo-experimental' && secrets.OVH_APP_KEY != ''
|
2024-10-01 13:02:16 +03:00
|
|
|
uses: https://code.forgejo.org/actions/setup-go@v5
|
2023-08-21 17:38:29 +03:00
|
|
|
with:
|
2024-08-03 10:55:09 +03:00
|
|
|
go-version-file: "go.mod"
|
2023-08-21 17:38:29 +03:00
|
|
|
- name: update the _release.experimental DNS record
|
2023-12-28 19:23:09 +03:00
|
|
|
if: vars.ROLE == 'forgejo-experimental' && secrets.OVH_APP_KEY != ''
|
2023-08-21 17:38:29 +03:00
|
|
|
uses: https://code.forgejo.org/actions/ovh-dns-update@v1
|
|
|
|
with:
|
|
|
|
subdomain: _release.experimental
|
|
|
|
domain: forgejo.com # there is a CNAME from .org to .com (for security reasons)
|
|
|
|
record-id: 5283602601
|
|
|
|
value: v=${{ github.ref_name }}
|
|
|
|
ovh-app-key: ${{ secrets.OVH_APP_KEY }}
|
|
|
|
ovh-app-secret: ${{ secrets.OVH_APP_SECRET }}
|
|
|
|
ovh-consumer-key: ${{ secrets.OVH_CON_KEY }}
|