Skip to content

Commit

Permalink
fix(workflows): fix release-apps if conditions (#1717)
Browse files Browse the repository at this point in the history
<!--  Thanks for sending a pull request! -->

#### 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
  • Loading branch information
fuxingloh authored Aug 24, 2022
1 parent ed81791 commit b2cb1e2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/release-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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.
1 change: 0 additions & 1 deletion .github/workflows/release-ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ env:

jobs:
build:
if: github.actor != 'dependabot[bot]'
name: Publish
runs-on: ubuntu-latest
environment: ECR Release Publishing
Expand Down
1 change: 1 addition & 0 deletions .idea/dictionaries/fuxing.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b2cb1e2

Please sign in to comment.