diff --git a/.github/workflows/clean-up-unused-images.yaml b/.github/workflows/clean-up-unused-images.yaml index 3b5018534b..0dbae8ef3e 100644 --- a/.github/workflows/clean-up-unused-images.yaml +++ b/.github/workflows/clean-up-unused-images.yaml @@ -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/vault-action@v3.0.0 + 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 @@ -71,5 +80,7 @@ jobs: EOF )" + env: + GITHUB_TOKEN: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }}