-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.08 KB
/
publish_latest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: publish_latest
on:
push:
branches:
- 'main'
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: |
docker build . --tag ghcr.io/badgerloop-software/engineering-data-distributor-image:latest
docker push ghcr.io/badgerloop-software/engineering-data-distributor-image:latest
delete_untagged_images:
needs: build_and_publish
name: Delete Untagged Images
runs-on: ubuntu-latest
steps:
- uses: actions/delete-package-versions@v4
with:
owner: badgerloop-software
package-name: engineering-data-distributor-image
package-type: container
password: ${{ secrets.GITHUB_TOKEN }}
min-versions-to-keep: 0
delete-only-untagged-versions: true