chore: Add Docker latest and nightly tag (#343)

This commit is contained in:
Pasquale De Vita 2022-02-15 14:41:49 +01:00 committed by GitHub
commit 458fb289a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,8 @@ on:
release: release:
types: types:
- created - created
schedule:
- cron: '00 00 * * *'
jobs: jobs:
docker: docker:
@ -25,7 +27,8 @@ jobs:
- name: Set tag for image - name: Set tag for image
run: | run: |
echo IMAGE_TAG=$([ ${{ github.ref_type }} == 'tag' ] && echo ${{ github.ref_name }} || echo 'latest') >> $GITHUB_ENV echo IMAGE_TAG=$([ ${{ github.ref_type }} == 'tag' ] && echo ${{ github.ref_name }} || echo 'latest') >> $GITHUB_ENV
- name: Build and Push - name: Build and Push release
if: github.event_name != 'schedule'
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
@ -35,3 +38,15 @@ jobs:
push: true push: true
tags: | tags: |
ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}
ghcr.io/${{ github.repository }}:latest
- name: Build and Push nightly
if: github.event_name == 'schedule'
uses: docker/build-push-action@v2
with:
context: .
build-args: |
INSTALL_ALL=true
platforms: linux/amd64
push: true
tags: |
ghcr.io/${{ github.repository }}:nightly