updated to CRAN version 1.3.3 #27
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
#.......................................................................................................... | |
# build, push and cache the docker image. I have to adjust the following in case of a different repository: | |
# - I have to add the 'BUILD_DATE' arg in the Dockerfile | |
# - I have to create a DOCKER_PASSWORD (use the docker token) in the 'Settings' tab of the repository | |
# References: | |
# - https://github.com/mlampros/IceSat2R/blob/master/.github/workflows/docker_image.yml | |
# - https://github.com/orgs/community/discussions/25768#discussioncomment-3249184 | |
#.......................................................................................................... | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
name: docker_img | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- id: string | |
uses: ASzc/change-string-case-action@v1 | |
with: | |
string: ${{ github.event.repository.name }} | |
- name: Check Out Repo | |
uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ | |
build-args: BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" | |
file: ./Dockerfile | |
builder: ${{ steps.buildx.outputs.name }} | |
push: true | |
tags: ${{ github.repository_owner }}/${{ steps.string.outputs.lowercase }}:rstudiodev | |
cache-from: type=registry,ref=${{ github.repository_owner }}/${{ steps.string.outputs.lowercase }}:buildcache | |
cache-to: type=registry,ref=${{ github.repository_owner }}/${{ steps.string.outputs.lowercase }}:buildcache,mode=max |