Merge pull request #49 from AscensionGameDev/fix/2141 #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate upgrade commit from *_full branch | |
on: | |
# Triggers the workflow on push to *_full branches | |
push: | |
branches: [ main_full, development_full ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
inputs: | |
GITHUB_REF_NAME: | |
description: 'Target' | |
required: true | |
default: 'main_full' | |
type: choice | |
options: | |
- main_full | |
jobs: | |
generate_upgrade: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Determine target _upgrade branch | |
id: target_branch | |
env: | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
run: | | |
INTERSECT_TARGET_BRANCH=${GITHUB_REF_NAME/_full/_upgrade} | |
echo "name=$INTERSECT_TARGET_BRANCH" >> $GITHUB_OUTPUT | |
- name: Checkout target _upgrade branch | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
path: target | |
ref: ${{ steps.target_branch.outputs.name }} | |
token: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN }} | |
- name: Checkout branch of the custom action | |
uses: actions/checkout@v3 | |
with: | |
path: actions | |
ref: actions | |
token: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN }} | |
- name: Checkout modified files from _full branch | |
uses: ./actions/generate-upgrade-commit | |
with: | |
base-revision: a14d915251570c4bdc2e2b0562130621781becd2 | |
repo-root: target | |
target-revision: ${{ github.sha }} | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
git_commit_gpgsign: true | |
git_config_global: true | |
git_user_signingkey: true | |
gpg_private_key: ${{ secrets.INTERSECTBOT_GPG_PRIVATE_KEY }} | |
- name: Generate commit | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
add_options: '-A' | |
commit_message: "bot: automatically generating upgrade commit for ${{ github.sha }}" | |
commit_options: '--no-verify --signoff' | |
commit_user_name: Intersect Bot | |
commit_user_email: [email protected] | |
repository: target | |
skip_fetch: true |