Skip to content
Open
Show file tree
Hide file tree
Changes from 9 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
58 changes: 58 additions & 0 deletions .github/workflows/cd-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Docker Image Build

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2.3.4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: MongoDB in GitHub Actions
uses: supercharge/mongodb-github-action@1.3.0

- name: Restore dependency cache
uses: actions/cache@v2.1.4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'

- name: Install system packages
run: |
sudo apt-get -qq update
sudo apt-get install graphviz python3-pip
sudo pip install cwltool

- name: Build and test with Maven
run: |
./mvnw test -B

- name: Coverage report
run: |
mvn prepare-package -DskipTests=true
mvn cobertura:cobertura coveralls:report --no-transfer-progress -DrepoToken=$COVERALLS_SECRET -DpullRequest=${{ github.event.number }}
env:
CI_NAME: github
COVERALLS_SECRET: ${{ secrets.GITHUB_TOKEN }}
Comment thread
kinow marked this conversation as resolved.
Outdated

- name: Build and Push
run: |
VERSION=$(date +%s)
Comment thread
kinow marked this conversation as resolved.
Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

73 changes: 73 additions & 0 deletions cd-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CWL Viewer Docker Image Build
Comment thread
tetron marked this conversation as resolved.
Outdated

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2.3.4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: MongoDB in GitHub Actions
uses: supercharge/mongodb-github-action@1.3.0

- name: Restore dependency cache
uses: actions/cache@v2.1.4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'

- name: Install system packages
run: |
sudo apt-get -qq update
sudo apt-get install graphviz python3-pip
sudo pip install cwltool

- name: Build and test with Maven
run: |
./mvnw test -B

- name: Coverage report
run: |
mvn prepare-package -DskipTests=true
mvn cobertura:cobertura coveralls:report --no-transfer-progress -DrepoToken=$COVERALLS_SECRET -DpullRequest=${{ github.event.number }}
env:
CI_NAME: github
COVERALLS_SECRET: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/test:version

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}