From b2cb1e2aa23283930a927a43725ddde570aa50b9 Mon Sep 17 00:00:00 2001 From: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com> Date: Wed, 24 Aug 2022 11:30:06 +0800 Subject: [PATCH] fix(workflows): fix release-apps if conditions (#1717) #### What this PR does / why we need it: Fix the "if" conditions for the GHCR Pull Request workflow; the if condition needs to check if `head != base`. Also added more liberal `.github/labeler.yml` "Semantic PR" scopes --- .github/labeler.yml | 10 +++++----- .github/workflows/release-apps.yml | 16 ++++++++++++++-- .github/workflows/release-ecr.yml | 1 - .idea/dictionaries/fuxing.xml | 1 + 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index a4736d7a7a..8dca3021de 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -4,27 +4,27 @@ labels: - label: kind/feature sync: true matcher: - title: "^feat\\(.+\\): .+" + title: "^feat\\(.+\\)?: .+" - label: kind/fix sync: true matcher: - title: "^fix\\(.+\\): .+" + title: "^fix\\(.+\\)?: .+" - label: kind/chore sync: true matcher: - title: "^chore\\(.+\\): .+" + title: "^chore\\(.+\\)?: .+" - label: kind/refactor sync: true matcher: - title: "^refactor\\(.+\\): .+" + title: "^refactor\\(.+\\)?: .+" - label: kind/docs sync: true matcher: - title: "^docs\\(.+\\): .+" + title: "^docs\\(.+\\)?: .+" - label: kind/dependencies sync: true diff --git a/.github/workflows/release-apps.yml b/.github/workflows/release-apps.yml index f1f10ba4fe..378a7d8ffd 100644 --- a/.github/workflows/release-apps.yml +++ b/.github/workflows/release-apps.yml @@ -17,7 +17,7 @@ env: jobs: build: - if: github.repository == 'JellyfishSDK/jellyfish' && github.actor != 'dependabot[bot]' + if: github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') name: Publish runs-on: ubuntu-latest strategy: @@ -61,7 +61,7 @@ jobs: cache-to: type=registry,ref=ghcr.io/jellyfishsdk/jellyfish:buildcache,mode=max report: - if: github.repository == 'JellyfishSDK/jellyfish' && github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' name: Report runs-on: ubuntu-latest needs: build @@ -80,3 +80,15 @@ jobs: with: header: release message: ${{ steps.report.outputs.result }} + + forked: + if: github.event_name == 'pull_request' && (github.event.pull_request.head.repo.full_name != github.repository || github.actor == 'dependabot[bot]') + name: Forked Report + runs-on: ubuntu-latest + steps: + - name: Post Report + uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443 + with: + header: release + message: | + Due to forked Pull Request limited permissions, docker build preview for jellyfish/apps cannot be generated for this PR. \ No newline at end of file diff --git a/.github/workflows/release-ecr.yml b/.github/workflows/release-ecr.yml index 30d8620452..8ed5a5c6a2 100644 --- a/.github/workflows/release-ecr.yml +++ b/.github/workflows/release-ecr.yml @@ -13,7 +13,6 @@ env: jobs: build: - if: github.actor != 'dependabot[bot]' name: Publish runs-on: ubuntu-latest environment: ECR Release Publishing diff --git a/.idea/dictionaries/fuxing.xml b/.idea/dictionaries/fuxing.xml index 2b5e4a2416..31cc996b7a 100644 --- a/.idea/dictionaries/fuxing.xml +++ b/.idea/dictionaries/fuxing.xml @@ -182,6 +182,7 @@ mediantime mempool merkleroot + micnncim mincolratio mintable mintedblocks