Skip to content

Biosecurity basics

Biosecurity basics #29

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Tags
id: meta
uses: docker/metadata-action@v4
with:
images: hicsail/damplab-ui
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build & Push Docker Build
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Push to Staging
uses: fjogeleit/http-request-action@v1
if: github.ref == 'refs/heads/main'
with:
method: "POST"
url: ${{ secrets.PORTAINER_STAGING_WEBHOOK }}
preventFailureOnNoResponse: true