Skip to content

Deploy

Deploy #6

Workflow file for this run

name: Deploy
on:
workflow_run:
workflows: "Continuous Integration"
types:
- completed
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets._DOCERHUB_USERNAME }}
password: ${{ secrets._DOCERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push client
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets._DOCERHUB_USERNAME }}/vaccine-app-server:latest
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Try to fail
run: exit 1