-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make docker build optinal from release workflow #399
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build Docker | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: Tag for release | ||
required: true | ||
|
||
jobs: | ||
build-docker: | ||
name: Build and Publis to Docker Hub | ||
runs-on: ubuntu-latest | ||
needs: build-binary | ||
steps: | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.inputs.tag }} | ||
- name: Download binary | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: oak-collator | ||
- name: Build | ||
run: | | ||
tag=${{ github.event.inputs.tag }} | ||
docker_tag="${tag:1}" | ||
docker build -f ./docker/turing/Dockerfile -t oaknetwork/turing:$docker_tag . | ||
docker tag oaknetwork/turing:$docker_tag oaknetwork/turing:latest | ||
docker push oaknetwork/turing:$docker_tag | ||
docker push oaknetwork/turing:latest | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,10 @@ on: | |
tag: | ||
description: Tag for release | ||
required: true | ||
draft: | ||
description: draf release will not make the final image and skip some particular steps | ||
type: boolean | ||
required: true | ||
|
||
jobs: | ||
build-binary: | ||
|
@@ -33,6 +37,7 @@ jobs: | |
with: | ||
name: oak-collator | ||
path: artifacts/ | ||
|
||
build-runtime: | ||
name: Build Runtime | ||
runs-on: ubuntu-latest | ||
|
@@ -62,32 +67,19 @@ jobs: | |
path: | | ||
${{ matrix.chain }}-runtime.wasm | ||
${{ matrix.chain }}-srtool-digest.json | ||
|
||
build-docker: | ||
name: Build Docker | ||
runs-on: ubuntu-latest | ||
needs: build-binary | ||
steps: | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.inputs.tag }} | ||
- name: Download binary | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: oak-collator | ||
- name: Build | ||
run: | | ||
tag=${{ github.event.inputs.tag }} | ||
docker_tag="${tag:1}" | ||
docker build -f ./docker/turing/Dockerfile -t oaknetwork/turing:$docker_tag . | ||
docker tag oaknetwork/turing:$docker_tag oaknetwork/turing:latest | ||
docker push oaknetwork/turing:$docker_tag | ||
docker push oaknetwork/turing:latest | ||
use: ./.github/workflows/build-docker.yml | ||
with: | ||
tag: ${{ github.event.inputs.tag }} | ||
secrets: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
if: github.event.inputs.draft == 'true' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chrisli30 I extract into a standalone job so we can run it separately, but at the same time I run this optinally so we don't need to remember to run 2 jobs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm I think we can remove it from this Release script, because the Docker publish job doesn’t need to run until the very end of the release, and as you said, the image is optional when upgrading Turing Network. The two jobs are not supposed to run simultaneously and have different priorities. |
||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
darf release
? 😅skip some particular steps
is vauge. Let’s avoid wordings like this and explain the most important things here.Is it
will not build and publish a Docker image on Dockerhub
?