Adds preprocessCore to dependencies #8
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
name: build-push-shinyapp | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-push-shinyapp: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
env: | |
CONTAINER_NAME: pb-shinyapp | |
CONTEXT: ./app/ | |
DOCKERFILE: app/Dockerfile.shinyapp | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build | |
uses: docker/build-push-action@v5 | |
with: | |
context: ${{ env.CONTEXT }} | |
file: ${{ env.DOCKERFILE }} | |
load: true | |
tags: ${{ env.CONTAINER_NAME }}:testing | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
# - name: Test | |
# run: | | |
# expected=\ | |
# "Some expected output" | |
# actual=$(docker run ${{ env.CONTAINER_NAME }}:testing) | |
# if [ "$expected" = "$actual" ]; then | |
# echo "Passed - $actual" | |
# else | |
# echo "ERROR - Expected: $expected" | |
# echo " Actual: $actual" | |
# status=1 | |
# fi | |
# exit $status | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push latest | |
run: | | |
docker image tag ${{ env.CONTAINER_NAME }}:testing ghcr.io/uomresearchit/${{ env.CONTAINER_NAME }}:latest | |
docker push ghcr.io/uomresearchit/${{ env.CONTAINER_NAME }}:latest |