Build and push final image #38
Workflow file for this run
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
name: Build and push final image | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- docker/** | |
workflow_run: | |
workflows: [Build and push ngen image] | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
on-success: | |
runs-on: self-hosted | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: deploy | |
uses: actions/checkout@v2 | |
- name: Build and push Docker image | |
uses: ./.github/action_templates/build-and-push | |
with: | |
docker-auth-token: ${{ secrets.DOCKER_AUTH_TOKEN }} | |
github-sha: ${{ github.sha }} | |
image-name: "ciroh-ngen-image" | |
dockerfile-name: "Dockerfile" | |
- name: Publish slack message | |
if: always() | |
uses: ./.github/action_templates/slack | |
with: | |
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} | |
job-status: ${{ job.status }} | |
pull_request_url: ${{ github.event.pull_request.html_url }} | |
head_commit_url: ${{ github.event.head_commit.url }} | |
on-failure: | |
runs-on: self-hosted | |
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | |
steps: | |
- run: echo 'The triggering workflow failed' | |
- name: Publish slack message | |
if: always() | |
uses: ./.github/action_templates/slack | |
with: | |
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} | |
job-status: ${{ job.status }} | |
pull_request_url: ${{ github.event.pull_request.html_url }} | |
head_commit_url: ${{ github.event.head_commit.url }} |