Skip to content

Commit

Permalink
Merge pull request #1148 from rajpalc7/gha
Browse files Browse the repository at this point in the history
Restricting GHA run to execute on the main BCGov repository
  • Loading branch information
WadeBarnes authored May 10, 2024
2 parents 0dba656 + 337df38 commit a7bf4af
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/chart_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
# This job checks the remote file is up to date with the local one on release
validate-gh-pages-index:
runs-on: ubuntu-latest
if: github.repository_owner == 'bcgov'
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -27,6 +28,7 @@ jobs:
chart-release:
name: Create chart release
runs-on: ubuntu-latest
if: github.repository_owner == 'bcgov'
needs: [ validate-gh-pages-index ]
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/delete_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
clean-ghcr:
name: Delete old unused container images
runs-on: ubuntu-22.04
if: github.repository_owner == 'bcgov'
steps:
- name: Delete containers older than a Month
uses: snok/container-retention-policy@v2
Expand All @@ -19,4 +20,4 @@ jobs:
org-name: ${{ github.repository_owner}}
skip-tags: pr-* , *.*.*
token: ${{ secrets.PAT }}
token-type: 'pat'
token-type: 'pat'
3 changes: 2 additions & 1 deletion .github/workflows/on_pr_closed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
clean-ghcr:
runs-on: ubuntu-22.04
if: github.repository_owner == 'bcgov'
name: Delete closed or stale pr images
steps:
- name: Delete containers
Expand All @@ -57,4 +58,4 @@ jobs:
org-name: ${{ github.repository_owner}}
filter-tags: pr-${{ github.event.number }}
token: ${{ secrets.PAT }}
token-type: 'pat'
token-type: 'pat'
1 change: 1 addition & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
stale:
runs-on: ubuntu-22.04
if: github.repository_owner == 'bcgov'
steps:
- uses: actions/stale@v9
with:
Expand Down

0 comments on commit a7bf4af

Please sign in to comment.