Skip to content

Commit

Permalink
chore: update docker-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoesbergen authored Apr 7, 2024
1 parent 812049a commit fe3e3d1
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,31 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Docker Login
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4.0.0
uses: docker/build-push-action@v5
with:
file: Dockerfile
context: .
push: true
tags: ghcr.io/djoamersfoort/corvee/corvee:latest

- name: Redeploy
run: |
curl https://portainer.djoamersfoort.nl/hooks/update-docker-image?stack=corvee_djoamersfoort_nl -H "X-Token: ${{ secrets.WEBHOOK_TOKEN }}"
- name: Clean up old images
uses: actions/delete-package-versions@v5
with:
package-name: 'corvee/corvee'
package-type: 'container'
min-versions-to-keep: 5
delete-only-untagged-versions: 'true'

0 comments on commit fe3e3d1

Please sign in to comment.