Skip to content

fix: misc missing await #53

fix: misc missing await

fix: misc missing await #53

name: Build
on:
workflow_dispatch:
release:
types: [published]
jobs:
build-deploy:
name: Build and Publish (on production)
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Log into Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_LOGIN }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up QEMU for ARM build
uses: docker/setup-qemu-action@v2
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
file: "./Dockerfile"
build-args: |
"RELEASE_VERSION=${{ github.event.release.tag_name || github.ref }}"
platforms: |
linux/amd64
linux/arm64
push: true
tags: |
exordelabs/orchestrator:${{ github.event.release.tag_name || github.ref }}
exordelabs/orchestrator:latest
- name: Send a message to slack if CI has succeeded
if: ${{ success() }}
uses: slackapi/[email protected]
with:
payload: |
{
"text": "✓ The CI _'${{ github.workflow }}'_ of repository _${{ github.repository }}_ has been successfully deployed. Link to release: ${{ github.event.release.html_url }}."
}
- name: Send a message to slack if CI has failed
if: ${{ failure() }}
uses: slackapi/[email protected]
with:
payload: |
{
"text": ":x: The CI _'${{ github.workflow }}'_ of repository _${{ github.repository }}_ has failed. Link to release: ${{ github.event.release.html_url }}."
}