-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate workflows to GH Actions (#34)
* Added action which can build and publish docker image * renamed actions file to the correct syntax * Fixed build_workflow syntax for using the action * fixed spelling error * Update yml syntax of the composite action * removed docker login from build_and_publish actions * Testing to see if docker image is built successfully * Fixed spelling error when passing image name * Removed the buildx setup * Removed the build_and_publish action * Added the dzil docker build job to build_workflow * Added a reusable hadolint job * Fixed syntax error * Added print statements to identify the file being linted * exporting ignore rules in the same line as the hadolint command * testing environment variable export for ignore rules * testing if env is set * Updated hadolint job to specify ignore rules directly * fixed syntax error * Added perl job dependency on dzil job * Improved step name * Specified tag for the image built * Added daily workflow * testing if build works * Testing both perl and dzil building for master * testing dzil push on master * trying out specific commits for github actions * trying out specific commits for github actions * Added merged and tagged workflows * Removed commented code added for testing * Addeded perl job dependency for dzil * removed debug step * updated actions and hadolint versions * removed circleci config
- Loading branch information
1 parent
48d568a
commit 6a0428c
Showing
6 changed files
with
200 additions
and
106 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,18 +1,41 @@ | ||
name: Build workflow | ||
run-name: Build workflow | ||
on: [push] | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
Explore-GitHub-Actions: | ||
perl: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | ||
- name: List files in the repository | ||
run: | | ||
ls ${{ github.workspace }} | ||
- run: echo "🍏 This job's status is ${{ job.status }}." | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v4 | ||
- | ||
name: Build Docker Image | ||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 | ||
with: | ||
context: '.' | ||
tags: deriv/perl:latest | ||
push: false | ||
dzil: | ||
needs: perl | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v4 | ||
- | ||
name: Build Docker Image | ||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 | ||
with: | ||
context: 'dzil/' | ||
tags: deriv/dzil:latest | ||
push: false | ||
hadolint: | ||
uses: ./.github/workflows/hadolint.yml |
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,48 @@ | ||
name: Daily master test | ||
run-name: Daily test on master branch | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '05 19 * * *' | ||
jobs: | ||
perl: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v4 | ||
- | ||
name: Docker Login | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build And Publish Docker Image | ||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 | ||
with: | ||
context: '.' | ||
tags: deriv/perl:latest | ||
push: true | ||
dzil: | ||
needs: perl | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v4 | ||
- | ||
name: Docker Login | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build And Publish Docker Image | ||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 | ||
with: | ||
context: 'dzil/' | ||
tags: deriv/dzil:latest | ||
push: true | ||
hadolint: | ||
uses: ./.github/workflows/hadolint.yml |
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,20 @@ | ||
on: | ||
workflow_call: | ||
jobs: | ||
hadolint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- | ||
name: Install hadolint | ||
run: | | ||
sudo wget -O /usr/bin/hadolint https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 | ||
sudo chmod +x /usr/bin/hadolint | ||
- | ||
name: Lint perl Dockerfile | ||
run: hadolint --ignore DL3008 --ignore SC2046 --ignore DL3003 --ignore DL4006 --ignore DL3006 --ignore DL3005 Dockerfile | ||
- | ||
name: Lint dzil Dockerfile | ||
run: hadolint --ignore DL3008 --ignore SC2046 --ignore DL3003 --ignore DL4006 --ignore DL3006 --ignore DL3005 dzil/Dockerfile |
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,49 @@ | ||
name: Merged | ||
run-name: Merged | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
perl: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v4 | ||
- | ||
name: Docker Login | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build And Publish Docker Image | ||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 | ||
with: | ||
context: '.' | ||
tags: deriv/perl:latest | ||
push: true | ||
dzil: | ||
needs: perl | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v4 | ||
- | ||
name: Docker Login | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build And Publish Docker Image | ||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 | ||
with: | ||
context: 'dzil/' | ||
tags: deriv/dzil:latest | ||
push: true | ||
hadolint: | ||
uses: ./.github/workflows/hadolint.yml |
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,47 @@ | ||
name: Tagged | ||
run-name: Tagged | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
perl: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v4 | ||
- | ||
name: Docker Login | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build And Publish Docker Image | ||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 | ||
with: | ||
context: '.' | ||
tags: deriv/perl:latest | ||
push: true | ||
dzil: | ||
needs: perl | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v4 | ||
- | ||
name: Docker Login | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build And Publish Docker Image | ||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 | ||
with: | ||
context: 'dzil/' | ||
tags: deriv/dzil:latest | ||
push: true |