-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: [ci skip] [test skip] move docker publish workflow to a separa…
…te action (#314)
- Loading branch information
Showing
2 changed files
with
52 additions
and
27 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,52 @@ | ||
name: docker-publish | ||
on: | ||
workflow_dispatch: # manually run | ||
inputs: | ||
packages: | ||
description: 'Comma-separated list of packages to publish to Docker Hub' | ||
required: true | ||
default: '*' | ||
graduate: | ||
description: 'Graduate from prerelease' | ||
required: false | ||
default: 'false' | ||
|
||
|
||
|
||
env: | ||
CI: true | ||
|
||
jobs: | ||
publish: | ||
name: docker-publish | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Docker login | ||
if: "contains(github.event.inputs.packages, 'hydra-indexer') || github.event.inputs.packages == '*'" | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Docker build | ||
if: "contains(github.event.inputs.packages, 'hydra-indexer') || github.event.inputs.packages == '*'" | ||
run: | | ||
docker build . -t hydra-builder:latest | ||
- name: Publish hydra-indexer image | ||
if: "contains(github.event.inputs.packages, 'hydra-indexer') || github.event.inputs.packages == '*'" | ||
run: | | ||
(cd ./packages/hydra-indexer && yarn docker:publish) | ||
env: | ||
RELEASE_TAG: ${{ github.event.inputs.graduate == 'true' && 'latest' || 'next' }} | ||
|
||
- name: Publish hydra-indexer-gateway image | ||
if: "contains(github.event.inputs.packages, 'hydra-indexer-gateway') || github.event.inputs.packages == '*'" | ||
run: | | ||
(cd ./packages/hydra-indexer-gateway && yarn docker:publish) | ||
env: | ||
RELEASE_TAG: ${{ github.event.inputs.graduate == 'true' && 'latest' || 'next' }} | ||
|
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