updates to build.yml #239
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
permissions: | |
packages: write | |
name: Build | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Login to Github Container Registry | |
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Build Docker Image | |
run: docker build -t ghcr.io/sharknoon/pixina . | |
- name: Push Image to Registry | |
run: docker push ghcr.io/sharknoon/pixina | |
clean: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete old image versions | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-type: 'container' | |
package-name: 'pixina' | |
min-versions-to-keep: 1 |