mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-28 13:49:13 -05:00
e3698d8662
Because setup-go fails to pick it up. Refs: https://github.com/actions/setup-go/issues/462 (cherry picked from commit d7aaefcea9d38ca50a96f34ff42efe954bce4acd) Conflicts: .forgejo/workflows/build-release.yml .forgejo/workflows/cascade-setup-end-to-end.yml .forgejo/workflows/e2e.yml .forgejo/workflows/testing.yml trivial context conflict
72 lines
2.4 KiB
YAML
72 lines
2.4 KiB
YAML
# SPDX-License-Identifier: MIT
|
|
#
|
|
# See also https://forgejo.org/docs/next/developer/RELEASE/#release-process
|
|
#
|
|
# https://codeberg.org/forgejo-experimental/forgejo
|
|
#
|
|
# Copies a release from codeberg.org/forgejo-integration to codeberg.org/forgejo-experimental
|
|
#
|
|
# ROLE: forgejo-experimental
|
|
# FORGEJO: https://codeberg.org
|
|
# FROM_OWNER: forgejo-integration
|
|
# TO_OWNER: forgejo-experimental
|
|
# DOER: forgejo-experimental-ci
|
|
# TOKEN: <generated from codeberg.org/forgejo-experimental-ci>
|
|
#
|
|
# http://private.forgejo.org/forgejo/forgejo
|
|
#
|
|
# Copies & sign a release from codeberg.org/forgejo-integration to codeberg.org/forgejo
|
|
#
|
|
# ROLE: forgejo-release
|
|
# FORGEJO: https://codeberg.org
|
|
# FROM_OWNER: forgejo-integration
|
|
# TO_OWNER: forgejo
|
|
# DOER: release-team
|
|
# TOKEN: <generated from codeberg.org/release-team>
|
|
# GPG_PRIVATE_KEY: <XYZ>
|
|
# GPG_PASSPHRASE: <ABC>
|
|
#
|
|
name: Pubish release
|
|
|
|
on:
|
|
push:
|
|
tags: 'v*'
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: self-hosted
|
|
if: secrets.DOER != '' && secrets.FORGEJO != '' && secrets.TO_OWNER != '' && secrets.FROM_OWNER != '' && secrets.TOKEN != ''
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: copy & sign binaries and container images from one owner to another
|
|
uses: ./.forgejo/actions/publish-release
|
|
with:
|
|
forgejo: ${{ secrets.FORGEJO }}
|
|
from-owner: ${{ secrets.FROM_OWNER }}
|
|
to-owner: ${{ secrets.TO_OWNER }}
|
|
ref-name: ${{ github.ref_name }}
|
|
doer: ${{ secrets.DOER }}
|
|
token: ${{ secrets.TOKEN }}
|
|
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
|
verbose: ${{ secrets.VERBOSE }}
|
|
|
|
|
|
- name: set up go for the DNS update below
|
|
uses: https://code.forgejo.org/actions/setup-go@v4
|
|
if: secrets.ROLE == 'forgejo-experimental'
|
|
with:
|
|
go-version: "1.21.8"
|
|
check-latest: true
|
|
- name: update the _release.experimental DNS record
|
|
if: secrets.ROLE == 'forgejo-experimental'
|
|
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 }}
|