mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
chore: Add Docker latest and nightly tag (#343)
This commit is contained in:
parent
e88abb6857
commit
458fb289a3
1 changed files with 16 additions and 1 deletions
17
.github/workflows/build-image.yaml
vendored
17
.github/workflows/build-image.yaml
vendored
|
|
@ -5,6 +5,8 @@ on:
|
|||
release:
|
||||
types:
|
||||
- created
|
||||
schedule:
|
||||
- cron: '00 00 * * *'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
|
|
@ -25,7 +27,8 @@ jobs:
|
|||
- name: Set tag for image
|
||||
run: |
|
||||
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
|
||||
with:
|
||||
context: .
|
||||
|
|
@ -35,3 +38,15 @@ jobs:
|
|||
push: true
|
||||
tags: |
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue