Skip to content

Commit

Permalink
feat: upgrade to 1.2.0 docker workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardFuchs committed Dec 27, 2024
1 parent 780b3f1 commit 422cc91
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 38 deletions.
48 changes: 12 additions & 36 deletions .github/workflows/docker-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,19 @@ on:
- 'README.md'
- 'LICENSE'
- 'docs'
branches: [main]
branches: [ main ]
workflow_dispatch:

env:
GLOBAL_IMAGE_NAME: universalregistrar/driver-did-ethr
GLOBAL_REPO_NAME: docker.io

jobs:
publish-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Import Secrets
uses: hashicorp/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
token: ${{ secrets.CI_SECRET_READER_PERIODIC_TOKEN }}
caCertificate: ${{ secrets.VAULTCA }}
secrets: |
ci/data/gh-workflows/${{ env.GLOBAL_REPO_NAME }} username | DOCKER_USERNAME ;
ci/data/gh-workflows/${{ env.GLOBAL_REPO_NAME }} password | DOCKER_PASSWORD ;
ci/data/gh-workflows/deployment-status slack-webhook-url | SLACK_WEBHOOK_URL
- name: Run build image action
run: docker build . -f ./docker/Dockerfile -t "${{ env.GLOBAL_REPO_NAME }}/${{ env.GLOBAL_IMAGE_NAME }}"

- name: Login user to repo
run: echo "${{ env.DOCKER_PASSWORD }}" | docker login "${{ env.GLOBAL_REPO_NAME }}" -u "${{ env.DOCKER_USERNAME }}" --password-stdin

- name: Push image
run: docker push "${{ env.GLOBAL_REPO_NAME }}/${{ env.GLOBAL_IMAGE_NAME }}"

- name: Slack notification
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,commit,action,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }}
docker-release:
uses: danubetech/workflows/.github/workflows/[email protected]
with:
GLOBAL_IMAGE_NAME: universalregistrar/driver-did-ethr
GLOBAL_REPO_NAME: docker.io
PATH_TO_DOCKERFILE: docker/Dockerfile
secrets:
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
CI_SECRET_READER_PERIODIC_TOKEN: ${{ secrets.CI_SECRET_READER_PERIODIC_TOKEN }}
VAULTCA: ${{ secrets.VAULTCA }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
4 changes: 2 additions & 2 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Docker release image
on:
workflow_dispatch:
inputs:
version-core:
release_type:
description: 'Major, Minor or Patch release'
type: choice
required: true
Expand All @@ -16,7 +16,7 @@ on:
jobs:

docker-release:
uses: danubetech/workflows/.github/workflows/docker-release-static-version.yml@main
uses: danubetech/workflows/.github/workflows/docker-release-static-version.yml@1.2.0
with:
GLOBAL_IMAGE_NAME: universalregistrar/driver-did-ethr
GLOBAL_REPO_NAME: docker.io
Expand Down

0 comments on commit 422cc91

Please sign in to comment.