update rgeoboundaries #51
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
# This workflow will build and push a new container image to Amazon ECR | |
# The following information will need to be included in your Github secrets: | |
# - DOCKER_USERNAME: docker user name | |
# - DOCKER_PASSWORD: password or access token | |
on: | |
push: | |
branches: | |
- master | |
- update_docker | |
paths: | |
- 'Dockerfile' | |
- 'Docker.Rprofile' | |
- 'renv/**' | |
- 'renv.lock' | |
- 'renv.cache/**' | |
- '.github/workflows/docker*' | |
name: Deploy to DockerHub | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
repository: HopkinsIDD/cholera-mapping-pipeline | |
ref: ${{ github.ref }} | |
lfs: true | |
- name: Checkout LFS objects | |
run: git lfs checkout | |
- name: Check that lfs files are present | |
run: wc -l renv.cache/R/renv/cache/v5/R-4.2/x86_64-pc-linux-gnu/abind/1.4-5/4f57884290cc75ab22f4af9e9d4ca862/abind/DESCRIPTION | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
Username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Generate Tags | |
id: tags | |
env: | |
IMAGE_TAG_RUN: ${{ github.run_number }} | |
IMAGE_TAG_REF: ${{ github.ref }} | |
run: | | |
echo "::set-output name=shashort::$(git log -1 --pretty=%h)" | |
echo "::set-output name=reftag::${IMAGE_TAG_REF##*/}-r$IMAGE_TAG_RUN" | |
- name: Build Push Master | |
uses: docker/build-push-action@v2 | |
if: contains( github.ref, 'master') || contains( github.base_ref, 'master' ) | |
with: | |
push: true | |
tags: | | |
hopkinsidd/choleramappingpipeline:latest | |
hopkinsidd/choleramappingpipeline:latest-master | |
hopkinsidd/choleramappingpipeline:${{steps.tags.outputs.shashort}} | |
hopkinsidd/choleramappingpipeline:${{steps.tags.outputs.reftag}} | |
hopkinsidd/choleramappingpipeline:${{ github.sha }} | |
- name: Build Push Master | |
uses: docker/build-push-action@v3 | |
if: (contains( github.ref, 'update_docker') || contains( github.base_ref, 'update_docker' )) | |
with: | |
context: . | |
push: true | |
tags: | | |
hopkinsidd/choleramappingpipeline:latest-dev | |
hopkinsidd/choleramappingpipeline:${{steps.tags.outputs.shashort}} | |
hopkinsidd/choleramappingpipeline:${{steps.tags.outputs.reftag}} | |
hopkinsidd/choleramappingpipeline:${{ github.sha }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
- name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
rm -rf /tmp/.buildx-cache-new |