Skip to content
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

Create image workflow #345

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Changes from 13 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
90351d7
Create cd-build.yml
obasekiosa Aug 11, 2021
a0c41ef
Create cd-build.yml
obasekiosa Aug 11, 2021
d1aea92
Create main.yml
obasekiosa Aug 11, 2021
ff1931f
Update main.yml
obasekiosa Aug 11, 2021
d4e924c
Update main.yml
obasekiosa Aug 16, 2021
33c94f7
Update main.yml
obasekiosa Aug 16, 2021
14f5e25
Update main.yml
obasekiosa Aug 16, 2021
faa6d2b
Update and rename main.yml to cd-build.yml
obasekiosa Aug 16, 2021
be67a65
Fix build and push docker image workflow
obasekiosa Aug 16, 2021
36e8c66
Remove redundant file
obasekiosa Aug 16, 2021
39e4488
Merge branch 'main' into create-image-workflow
obasekiosa Sep 30, 2021
ce1f71c
Update cd-build.yml
obasekiosa Oct 13, 2021
51ae39f
Merge branch 'main' into create-image-workflow
mr-c Oct 13, 2021
333aed7
Merge branch 'main' into create-image-workflow
mergify[bot] Nov 30, 2021
aab3184
Merge branch 'main' into create-image-workflow
mergify[bot] Dec 14, 2021
616d332
Merge branch 'main' into create-image-workflow
mergify[bot] Dec 16, 2021
f1c91fb
Merge branch 'main' into create-image-workflow
mergify[bot] Dec 18, 2021
c4fc907
Merge branch 'main' into create-image-workflow
mergify[bot] Dec 18, 2021
c4d84d4
Merge branch 'main' into create-image-workflow
mergify[bot] Dec 18, 2021
ea80265
Merge branch 'main' into create-image-workflow
mergify[bot] Dec 20, 2021
df4aa71
Merge branch 'main' into create-image-workflow
mergify[bot] Dec 20, 2021
0ca571a
Merge branch 'main' into create-image-workflow
mergify[bot] Dec 20, 2021
1aa607a
Merge branch 'main' into create-image-workflow
mergify[bot] Dec 20, 2021
8252409
Merge branch 'main' into create-image-workflow
mergify[bot] Dec 20, 2021
ac0417f
Merge branch 'main' into create-image-workflow
mergify[bot] Jan 3, 2022
c0fab0b
Merge branch 'main' into create-image-workflow
mr-c Feb 27, 2022
b540d32
Merge branch 'main' into create-image-workflow
mr-c Jun 8, 2022
2b63502
Merge branch 'main' into create-image-workflow
mr-c Dec 30, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/cd-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docker Image Build

on:
workflow_run:
workflows: ["CWL Viewer Build"]
branches: [main]
types:
- completed

jobs:
build-image:
runs-on: ubuntu-20.04

steps:
- uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Docker Image Build and Push
run: |
DATE=$(date +%s)
GIT_HASH=$(git rev-parse --short "$GITHUB_SHA")
VERSION= ${GIT_HASH}-${DATE}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
VERSION= ${GIT_HASH}-${DATE}
VERSION=${GIT_HASH}-${DATE}

docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
docker build . --file Dockerfile --tag ${{ secrets.DOCKER_HUB_USERNAME }}/cwlviewer:${VERSION}
docker push ${{ secrets.DOCKER_HUB_USERNAME }}/cwlviewer:${VERSION}
Comment on lines +22 to +27
Copy link
Member

@mr-c mr-c Oct 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@obasekiosa let me know if you have questions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifically, I would like this to match the tagging conventions and the --build-arg calls (lines 222 - 227) of https://github.com/common-workflow-language/cwlviewer/pull/360/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R216