Skip to content

Commit

Permalink
try again with access token
Browse files Browse the repository at this point in the history
  • Loading branch information
bigsk1 committed Jul 4, 2024
1 parent 552e647 commit b3ed198
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-push-image
permissions:
contents: read
packages: write
steps:
- name: Install GitHub CLI
Expand All @@ -84,6 +85,7 @@ jobs:
env:
PACKAGE_NAME: ${{ env.FRONTEND_IMAGE_NAME }}
PACKAGE_OWNER: ${{ github.repository_owner }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api --paginate -H "Accept: application/vnd.github+json" /orgs/${PACKAGE_OWNER}/packages/container/${PACKAGE_NAME}/versions > versions.json
jq -r '.[].id' versions.json | tail -n +4 | xargs -I {} gh api --method DELETE /orgs/${PACKAGE_OWNER}/packages/container/${PACKAGE_NAME}/versions/{} --silent
Expand All @@ -92,6 +94,7 @@ jobs:
env:
PACKAGE_NAME: ${{ env.BACKEND_IMAGE_NAME }}
PACKAGE_OWNER: ${{ github.repository_owner }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api --paginate -H "Accept: application/vnd.github+json" /orgs/${PACKAGE_OWNER}/packages/container/${PACKAGE_NAME}/versions > versions.json
jq -r '.[].id' versions.json | tail -n +4 | xargs -I {} gh api --method DELETE /orgs/${PACKAGE_OWNER}/packages/container/${PACKAGE_NAME}/versions/{} --silent
jq -r '.[].id' versions.json | tail -n +4 | xargs -I {} gh api --method DELETE /orgs/${PACKAGE_OWNER}/packages/container/${PACKAGE_NAME}/versions/{} --silent

0 comments on commit b3ed198

Please sign in to comment.