Skip to content

Commit

Permalink
switch docker workflow to release trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
jwetzell committed Jul 2, 2024
1 parent a63fa68 commit 195f9e8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Docker Image CI Ontime

on:
push:
tags: [ "*" ]
release:
types: [published]
workflow_dispatch:

jobs:
Expand All @@ -14,8 +14,6 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Setup env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Docker Login
uses: docker/[email protected]
Expand All @@ -35,7 +33,7 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
# Push is a shorthand for --output=type=registry
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ontime:${{ env.RELEASE_VERSION }} , ${{ secrets.DOCKERHUB_USERNAME }}/ontime:latest
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ontime:${{ github.event.release.tag_name }} , ${{ secrets.DOCKERHUB_USERNAME }}/ontime:latest

- name: Build and push pre-release
if: github.event.release.prerelease == true
Expand All @@ -46,5 +44,5 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
# Push is a shorthand for --output=type=registry
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ontime:${{ env.RELEASE_VERSION }} , ${{ secrets.DOCKERHUB_USERNAME }}/ontime:nightly
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ontime:${{ github.event.release.tag_name }} , ${{ secrets.DOCKERHUB_USERNAME }}/ontime:nightly

0 comments on commit 195f9e8

Please sign in to comment.