-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch docker workflow to release trigger
- Loading branch information
Showing
1 changed file
with
4 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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] | ||
|
@@ -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 | ||
|
@@ -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 | ||
|