Skip to content

refactor: Returning either byte array or String. #1

refactor: Returning either byte array or String.

refactor: Returning either byte array or String. #1

Workflow file for this run

name: Docker latest image
on:
push:
paths-ignore:
- '.gitignore'
- 'README.md'
- 'LICENSE'
- 'docs'
branches: [main, 'test-driver-**']
workflow_dispatch:
env:
IMAGE_NAME: universalresolver/uni-resolver-web
PATH_TO_DOCKERFILE: $GITHUB_WORKSPACE/uni-resolver-web/docker/Dockerfile
BUILD_CONTEXT: $GITHUB_WORKSPACE
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/dockerhub username | DOCKER_USERNAME ;
ci/data/gh-workflows/dockerhub password | DOCKER_PASSWORD ;
ci/data/gh-workflows/maven-danubetech-nexus username | MAVEN_USERNAME ;
ci/data/gh-workflows/maven-danubetech-nexus password | MAVEN_PASSWORD ;
ci/data/gh-workflows/deployment-status slack-webhook-url | SLACK_WEBHOOK_URL
- name: Build image
run: |
docker build "${{ env.BUILD_CONTEXT }}" -f "${{ env.PATH_TO_DOCKERFILE }}" -t "${{ env.IMAGE_NAME }}" \
--build-arg DANUBETECH_MAVEN_INTERNAL_USERNAME=${{ env.MAVEN_USERNAME }} \
--build-arg DANUBETECH_MAVEN_INTERNAL_PASSWORD=${{ env.MAVEN_PASSWORD }}
- name: Login user to Dockerhub
run: echo "${{ env.DOCKER_PASSWORD }}" | docker login -u "${{ env.DOCKER_USERNAME }}" --password-stdin
- name: Push image to Dockerhub
run: docker push "${{ env.IMAGE_NAME }}"
- name: Slack notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,commit,action,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }}
if: failure()
trigger-related-workflows:
needs: [publish-image]
runs-on: ubuntu-latest
steps:
- 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/workflow-dispatch token | WORKFLOW_DISPATCH_TOKEN ;
ci/data/gh-workflows/deployment-status slack-webhook-url | SLACK_WEBHOOK_URL
- name: Dispatch to AWS Kubernetes deployment
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ env.WORKFLOW_DISPATCH_TOKEN }}
workflow: AWS Kubernetes deployment
- name: Dispatch to danubetech/danubetech-uni-resolver-web
if: contains(github.ref, 'main')
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ env.WORKFLOW_DISPATCH_TOKEN }}
repo: danubetech/danubetech-uni-resolver-web
workflow: 12455759 # Docker latest image
- name: Slack notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,commit,action,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }}
if: failure()