feat(release/v0.14.03): Update sekai, interx, cosign #148
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: release/v*.*.* -PR-> master | |
on: | |
push: | |
branches: [ release/v*.*.* ] | |
jobs: | |
auto-pr: | |
name: Automated Master Branch PR | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
packages: write | |
id-token: write | |
pull-requests: write | |
steps: | |
- name: Extract branch name on pull request | |
shell: bash | |
run: | | |
echo "DEFAULT_BRANCH=master" >> $GITHUB_ENV | |
echo "SOURCE_BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV | |
- name: Print debug data before publishing | |
run: | | |
echo "Source branch: ${{ env.SOURCE_BRANCH }}" | |
echo " Event name: ${{ github.event_name }}" | |
echo " Repo. name: ${{ github.event.repository.name }}" | |
# Work around https://github.com/actions/checkout/issues/760 | |
- name: Add safe.directory | |
run: | | |
git config --global --add safe.directory /github/workspace | |
git config --global --add safe.directory $PWD | |
# ref.: https://github.com/actions/checkout, v3.0.0 | |
- name: Checkout repository | |
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 | |
- name: Close All PRs | |
uses: crondaemon/close-pr@v1 | |
with: | |
comment: "This PR is obsolete, ${{env.SOURCE_BRANCH}} branch is ahead of your branch." | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS }} | |
- name: Create PR from a version branch to master after version branch push | |
# ref. repo-sync/pull-request is broken, using cea2aj/pull-request instead | |
uses: cea2aj/pull-request@84eb0c3478f13651e5649367941b867ca02d7926 | |
if: startsWith(env.SOURCE_BRANCH, 'release/v') && contains(env.SOURCE_BRANCH, '.') | |
with: | |
github_token: ${{ secrets.REPO_ACCESS }} | |
source_branch: ${{ env.SOURCE_BRANCH }} | |
destination_branch: ${{ env.DEFAULT_BRANCH }} | |
pr_title: "${{ env.SOURCE_BRANCH }} -> ${{ env.DEFAULT_BRANCH }}" | |
pr_label: "kira-automation" | |
pr_assignee: "asmodat" | |
pr_allow_empty: true |