Skip to content

Update r-docker-deploy.yaml #2

Update r-docker-deploy.yaml

Update r-docker-deploy.yaml #2

name: Build R Docker Image
on:
push:
branches:
- main
jobs:
build-docker-image:
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Checkout code
uses: actions/checkout@v3
# Build Docker image
- name: Build Docker image
run: |
docker build -t ghcr.io/dfe-analytical-services/dfe-r-base:latest .
# Run R setup action inside Docker container
- name: Run R setup action
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
# Commit the changes to the Docker image
- name: Commit Docker image changes
run: |
docker commit $(docker ps -l -q) ghcr.io/dfe-analytical-services/dfe-r-base:latest
# Push Docker image to DockerHub
- name: Push Docker image to DockerHub
run: |
docker push ghcr.io/dfe-analytical-services/dfe-r-base:latest