Skip to content

Update Dockerfile

Update Dockerfile #11

Workflow file for this run

name: 'CD'
on:
workflow_dispatch:
push:
branches:
- master
- staging
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
prepare:
name: 'Prepare'
uses: rfcx/cicd/.github/workflows/notify-prepare.yaml@master
with:
repo: arbimon-clustering
workflow-id: cd.yaml
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
configure:
name: 'Configure'
runs-on: ubuntu-latest
needs: [prepare]
outputs:
namespace: ${{ steps.configuration.outputs.namespace }}
steps:
- name: 'Conditional environment'
id: configuration
run: |
if [[ "${{ needs.prepare.outputs.branch-name }}" == "master" ]]; then
echo "::set-output name=namespace::production"
elif [[ "${{ needs.prepare.outputs.branch-name }}" == "staging" ]]; then
echo "::set-output name=namespace::staging"
else
echo "::set-output name=namespace::testing"
fi
build:
name: 'Build'
needs: [prepare, configure]
uses: rfcx/cicd/.github/workflows/ecr-build-push.yaml@master
with:
dockerfile: Dockerfile
targets: "[\"arbimon-jobs-clustering\"]"
tag-environment: ${{ needs.configure.outputs.namespace }}
tag-latest: ${{ needs.configure.outputs.namespace == 'production' }}
secrets:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
notify:
name: 'Notify'
if: ${{ always() }}
needs: [prepare, build]
uses: rfcx/cicd/.github/workflows/notify-send.yaml@master
with:
repo: arbimon-clustering
branch-name: ${{ needs.prepare.outputs.branch-name }}
workflow-id: cd.yaml
previous-run-id: ${{ needs.prepare.outputs.previous-run-id }}
status: ${{ needs.deploy.result }}
always: true
notification-title: 'CD: Arbimon Jobs Clustering'
notification-footer: "Build: ${{ needs.build.result || 'n/a' }}"
notification-success-statement: '{0} deployed the build!'
secrets:
slack-webhook: ${{ secrets.SLACK_ALERT_COREDT_WEBHOOK }}
github-token: ${{ secrets.GITHUB_TOKEN }}