Docker #523
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | |
on: | |
workflow_dispatch: | |
schedule: | |
# run every second morning | |
- cron: '30 5 1/2 * *' | |
jobs: | |
docker: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Github Packages | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: ghcr.io/voc/srtrelay/srtrelay:latest | |
- name: Delete old containers | |
uses: actions/delete-package-versions@v4 | |
with: | |
package-name: 'srtrelay' | |
package-type: 'container' | |
min-versions-to-keep: 10 | |
delete-only-untagged-versions: 'true' |