Skip to content

Create image workflow #345

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

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
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/[email protected]
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: MongoDB in GitHub Actions
uses: supercharge/[email protected]

- name: Restore dependency cache
uses: actions/[email protected]
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: Build and Push
run: |
VERSION=$(date +%s)
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}
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

on:
push:
branches:
- main

jobs:
build:
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: MongoDB in GitHub Actions
uses: supercharge/[email protected]

- name: Restore dependency cache
uses: actions/[email protected]
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 }}