mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 17:53:55 +08:00
Pushes from GitHub actions do not trigger subsequent workflows. That means we miss CI (including asset publishing) when the release workflow cuts a new branch. We had a partial workaround using a deliberate workflow_dispatch, but it didn't trigger all CI jobs. This commit updates the release workflows to use the discoursebot identity, which we already use for similar reasons in other github workflows.
42 lines
986 B
YAML
Vendored
42 lines
986 B
YAML
Vendored
name: Release - create tags & branches
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
sha:
|
|
description: "The commit SHA to prepare the release for"
|
|
required: false
|
|
type: string
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "lib/version.rb"
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
build:
|
|
name: run
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'discourse/discourse'
|
|
container: discourse/discourse_test:slim
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
filter: tree:0
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GH_PUSH_TOKEN }}
|
|
|
|
- uses: ./.github/actions/setup-release-environment
|
|
|
|
- name: Maybe cut branch
|
|
if: github.ref == 'refs/heads/main'
|
|
run: bin/rake release:maybe_cut_branch[${{ inputs.sha || github.sha }}]
|
|
|
|
- name: Maybe tag release
|
|
run: bin/rake release:maybe_tag_release[${{ inputs.sha || github.sha }}]
|