Skip to content

Commit

Permalink
ci: fix package publish failure for fork
Browse files Browse the repository at this point in the history
  • Loading branch information
mnixry committed Aug 23, 2023
1 parent ef38258 commit d8974d4
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ jobs:
- name: Docker setup Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: gztime
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
Expand All @@ -69,10 +63,11 @@ jobs:
id: meta
with:
images: |
ghcr.io/${{ github.repository_owner }}/gzctf/gzctf
gztime/gzctf
ghcr.io/${{ github.repository }}
github-token: ${{ secrets.GITHUB_TOKEN }}
tags: |
latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
develop,enable=${{ startsWith(github.ref, 'refs/heads/develop') }}
type=ref,event=branch
type=semver,pattern={{raw}}
type=sha,enable=true,priority=100,prefix=,suffix=,format=short
Expand All @@ -86,17 +81,17 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true

- name: Prune old packages
uses: vlaurin/[email protected]
with:
dry-run: false
token: ${{ secrets.PACKAGE_TOKEN }}
container: "gzctf/gzctf"
keep-tags-regexes: ^v(.)*
prune-tags-regexes: ^[0-9a-f]{6,40}
keep-tags: |
latest
main
develop
keep-last: 20
prune-untagged: false
# - name: Prune old packages
# uses: vlaurin/[email protected]
# with:
# dry-run: false
# token: ${{ secrets.PACKAGE_TOKEN }}
# container: "gzctf/gzctf"
# keep-tags-regexes: ^v(.)*
# prune-tags-regexes: ^[0-9a-f]{6,40}
# keep-tags: |
# latest
# main
# develop
# keep-last: 20
# prune-untagged: false

0 comments on commit d8974d4

Please sign in to comment.