From bda2772e652d2ce677364be5e006d4ff085f792a Mon Sep 17 00:00:00 2001 From: mimo Date: Wed, 16 Oct 2024 12:34:53 +0900 Subject: [PATCH] feat(icon-workflow): Enable creation of PRs to the base branch --- .github/workflows/icons.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/icons.yml b/.github/workflows/icons.yml index 4678d958a..4a3ad74a4 100644 --- a/.github/workflows/icons.yml +++ b/.github/workflows/icons.yml @@ -8,13 +8,17 @@ on: env: OUTPUT_ROOT_DIR: packages/icon-files/ + TARGET_BRANCH: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || 'main' }} jobs: icons: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + ref: ${{ env.TARGET_BRANCH }} + - uses: actions/setup-node@v3 with: node-version-file: '.node-version' @@ -49,5 +53,5 @@ jobs: GITHUB_ACCESS_TOKEN: ${{ steps.generate_token.outputs.token }} GITHUB_REPO_OWNER: pixiv GITHUB_REPO_NAME: charcoal - GITHUB_DEFAULT_BRANCH: main + GITHUB_DEFAULT_BRANCH: ${{ env.TARGET_BRANCH }} run: yarn icons-cli github:pr