Skip to content

Commit 0498063

Browse files
committed
fix actions
1 parent abb5259 commit 0498063

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
name: Maven-Java
99
runs-on: ubuntu-22.04
1010
timeout-minutes: 10
11+
if: github.event_name == 'pull_request' && github.event.action != 'closed'
1112
steps:
1213
- uses: actions/checkout@v4
1314
- uses: aboutbits/github-actions-java/setup@v3
@@ -25,7 +26,7 @@ jobs:
2526
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2627
2728
snapshot:
28-
name: Publish snapshot
29+
name: Publish Snapshot
2930
runs-on: ubuntu-22.04
3031
timeout-minutes: 10
3132
needs: test
@@ -53,9 +54,13 @@ jobs:
5354
timeout-minutes: 10
5455
if: github.event_name == 'pull_request' && github.event.action == 'closed'
5556
steps:
56-
- name: Authenticate with GitHub Packages
57-
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USER_NAME --password-stdin
5857
- name: Remove snapshot version from repository
58+
uses: actions/delete-package-versions@v5
59+
with:
60+
package-type: 'maven'
61+
package-name: 'it.aboutbits.spring-boot-toolbox'
62+
package-version-ids: 'PR-${{ github.event.pull_request.number }}'
63+
token: ${{ secrets.GITHUB_PAT }}
5964
run: |
6065
curl -X DELETE -u ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} \
61-
https://maven.pkg.github.com/OWNER/REPOSITORY/com/example/myartifact/PR-${{ github.event.pull_request.number }}/
66+
https://maven.pkg.github.com/aboutbits/spring-boot-toolbox/PR-${{ github.event.pull_request.number }}/

0 commit comments

Comments
 (0)