Skip to content

Commit

Permalink
docs: adjust github action flow
Browse files Browse the repository at this point in the history
  • Loading branch information
addetz committed Oct 23, 2024
1 parent c0c8df8 commit 61fbebb
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/clean-up-unused-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,26 @@ concurrency:
group: clean-up-images-${{ github.ref }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
find_unused_images:
runs-on: ubuntu-latest

steps:
- name: Retrieve Credentials
id: import-secrets
uses: hashicorp/[email protected]
with:
url: https://vault.prism.spectrocloud.com
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: /providers/github/organizations/spectrocloud/token?org_name=spectrocloud token | VAULT_GITHUB_TOKEN

- id: checkout
name: Checkout Repository
uses: actions/checkout@v4
with:
token: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }}

- name: Setup Nodejs
uses: actions/setup-node@v4
Expand All @@ -34,8 +43,11 @@ jobs:
- name: Find unused images
run: make find-unused-images

- name: Install GitHub CLI
run: sudo apt-get install gh
- name: Set Git User
# see: https://github.com/actions/checkout/issues/13#issuecomment-724415212
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Create PR with unused images
run: |
Expand Down Expand Up @@ -71,5 +83,7 @@ jobs:
EOF
)"
env:
GH_TOKEN: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }}


0 comments on commit 61fbebb

Please sign in to comment.