forked from cadence-workflow/cadence
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
automate creating docker images and upload to dockerhub on release (c…
…adence-workflow#3703) * automatic publish docker image on github release * Separate server and auto-setup builds in workflow * fixed build argument prop name * update repository to point to ubercadence/server
- Loading branch information
1 parent
291897c
commit 923b7a7
Showing
1 changed file
with
42 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Publish Docker image | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
release: | ||
types: [ published ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
push_server_to_registry: | ||
name: Push Docker server image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- name: Push to Docker Hub (server build) | ||
if: "!github.event.release.prerelease" | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ secrets.CADENCE_SERVER_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.CADENCE_SERVER_DOCKERHUB_TOKEN }} | ||
repository: ubercadence/server | ||
build_args: TARGET=server | ||
tag_with_ref: true | ||
push_server_auto_setup_to_registry: | ||
name: Push Docker server auto-setup images to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- name: Push to Docker Hub (auto-setup build) | ||
if: "!github.event.release.prerelease" | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ secrets.CADENCE_SERVER_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.CADENCE_SERVER_DOCKERHUB_TOKEN }} | ||
repository: ubercadence/server | ||
build_args: TARGET=auto-setup | ||
tags: ${{ github.event.release.tag_name }}-auto-setup, latestRelease-auto-setup |