Skip to content

Mrc 5600 - status endpoint #32

Mrc 5600 - status endpoint

Mrc 5600 - status endpoint #32

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: Build-and-push
env:
TAG_DH: mrcide/orderly.runner
TAG_GHCR: mrc-ide/orderly.runner
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
jobs:
build-and-push:
runs-on: ubuntu-latest
# Shorter timeout to prevent mac builders hanging for 6 hours!
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- id: ci-env
name: Setup Environment
shell: bash
run: |
if [ "${{github.event_name}}" = "pull_request" ];
then
long_sha=${{ github.event.pull_request.head.sha }}
echo "CI_BRANCH=${{ github.head_ref }}" >> $GITHUB_OUTPUT
else
long_sha=${GITHUB_SHA}
echo "CI_BRANCH=${{ github.ref_name }}" >> $GITHUB_OUTPUT
fi
echo "CI_SHA=${long_sha:0:7}" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR (GitHub Packages)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ env.GITHUB_PAT }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
file: ./docker/Dockerfile
tags: |
${{env.TAG_DH}}:${{steps.ci-env.outputs.CI_SHA}}
${{env.TAG_DH}}:${{steps.ci-env.outputs.CI_BRANCH}}
ghcr.io/${{env.TAG_GHCR}}:${{steps.ci-env.outputs.CI_SHA}}
ghcr.io/${{env.TAG_GHCR}}:${{steps.ci-env.outputs.CI_BRANCH}}