|
14 | 14 | steps: |
15 | 15 | - name: Checkout repository |
16 | 16 | uses: actions/checkout@v3 |
17 | | - - name: Gather container image tags |
18 | | - uses: greenbone/actions/container-image-tags@v1 |
19 | | - id: container |
| 17 | + - name: Setup container meta information |
| 18 | + id: meta |
| 19 | + uses: docker/metadata-action@v4 |
| 20 | + with: |
| 21 | + images: greenbone/ospd-openvas |
| 22 | + labels: | |
| 23 | + org.opencontainers.image.vendor=Greenbone |
| 24 | + org.opencontainers.image.base.name=debian/stable-slim |
| 25 | + flavor: latest=false # no latest container tag for git tags |
| 26 | + tags: | |
| 27 | + # create container tag for git tags |
| 28 | + type=ref,event=tag |
| 29 | + # use latest for stable branch |
| 30 | + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'stable') }} |
| 31 | + type=raw,value=stable,enable=${{ github.ref == format('refs/heads/{0}', 'stable') }} |
| 32 | + type=raw,value=oldstable,enable=${{ github.ref == format('refs/heads/{0}', 'oldstable') }} |
| 33 | + # use unstable for main branch |
| 34 | + type=raw,value=unstable,enable={{is_default_branch}} |
20 | 35 | - name: Login to GitHub Container Registry |
21 | 36 | uses: docker/login-action@v2 |
22 | 37 | with: |
|
39 | 54 | with: |
40 | 55 | context: . |
41 | 56 | push: true |
42 | | - tags: ${{ steps.container.outputs.image-tags }} |
43 | 57 | platforms: linux/amd64,linux/arm64 |
44 | 58 | file: .docker/prod.Dockerfile |
| 59 | + tags: ${{ steps.meta.outputs.tags }} |
| 60 | + labels: ${{ steps.meta.outputs.labels }} |
0 commit comments