From 1d97bd35ba4c01c845129e4070b067368da6acfc Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Fri, 14 Apr 2023 16:29:59 -0400 Subject: [PATCH 01/17] Test Caching --- .github/workflows/deploy-on-pullrequest.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-on-pullrequest.yml b/.github/workflows/deploy-on-pullrequest.yml index f4e3e90..aad117a 100644 --- a/.github/workflows/deploy-on-pullrequest.yml +++ b/.github/workflows/deploy-on-pullrequest.yml @@ -16,13 +16,14 @@ jobs: # Checks-out your repository so your job can access it - uses: actions/checkout@v2 - #-name: Cache R Packages + -name: Cache R Packages #id: cache-r #-uses: r-lib/action/setup-r@v2 #-uses: r-lib/actions/setup-r-dependencies@v2 - #with: - # path: /tmp/cache - # key: ${{ runner.os }}-${{ hashFiles('**/DESCRIPTION')) }} + uses: actions/cache@v3 + with: + path: ${{ envR_LIBS_USER }} + key: r-${{ hashFiles('DESCRIPTION')) }} # build the docker image and give it the name main - name: Build image From f0eb75d8182b1bc21c3dd7989fc477bf2a182c65 Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Fri, 14 Apr 2023 16:33:38 -0400 Subject: [PATCH 02/17] Fixes --- .github/workflows/deploy-on-pullrequest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-on-pullrequest.yml b/.github/workflows/deploy-on-pullrequest.yml index aad117a..25324d3 100644 --- a/.github/workflows/deploy-on-pullrequest.yml +++ b/.github/workflows/deploy-on-pullrequest.yml @@ -14,9 +14,9 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - -name: Cache R Packages + - name: Cache R Packages #id: cache-r #-uses: r-lib/action/setup-r@v2 #-uses: r-lib/actions/setup-r-dependencies@v2 From 4f587526d90d8a0b1dcc0f7d9a2135a477d6b55e Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Fri, 14 Apr 2023 16:36:24 -0400 Subject: [PATCH 03/17] Syntax fixes --- .github/workflows/deploy-on-pullrequest.yml | 30 ++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy-on-pullrequest.yml b/.github/workflows/deploy-on-pullrequest.yml index 25324d3..ee43999 100644 --- a/.github/workflows/deploy-on-pullrequest.yml +++ b/.github/workflows/deploy-on-pullrequest.yml @@ -16,24 +16,24 @@ jobs: # Checks-out your repository so your job can access it - uses: actions/checkout@v3 - - name: Cache R Packages + - name: Cache R Packages #id: cache-r #-uses: r-lib/action/setup-r@v2 #-uses: r-lib/actions/setup-r-dependencies@v2 - uses: actions/cache@v3 - with: - path: ${{ envR_LIBS_USER }} - key: r-${{ hashFiles('DESCRIPTION')) }} + uses: actions/cache@v3 + with: + path: ${{ envR_LIBS_USER }} + key: r-${{ hashFiles('DESCRIPTION')) }} # build the docker image and give it the name main - - name: Build image - run: docker build -t pullrequestimage . + - name: Build image + run: docker build -t pullrequestimage . # run the docker image supply the secrets from the github secrets store. - - name: execute - run: > - docker run - -e SHINY_ACC_NAME=${{ secrets.SHINY_ACC_NAME }} - -e TOKEN=${{secrets.SHINY_APP_TOKEN}} - -e SECRET=${{secrets.SHINY_APP_SECRET}} - -e MASTERNAME=Testing - pullrequestimage \ No newline at end of file + - name: execute + run: > + docker run + -e SHINY_ACC_NAME=${{ secrets.SHINY_ACC_NAME }} + -e TOKEN=${{secrets.SHINY_APP_TOKEN}} + -e SECRET=${{secrets.SHINY_APP_SECRET}} + -e MASTERNAME=Testing + pullrequestimage \ No newline at end of file From a24820c5db1ab70e9a946910b81bc40d57a3a35f Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Fri, 14 Apr 2023 16:40:08 -0400 Subject: [PATCH 04/17] More syntax fixes --- .github/workflows/deploy-on-pullrequest.yml | 45 ++++++++++----------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/deploy-on-pullrequest.yml b/.github/workflows/deploy-on-pullrequest.yml index ee43999..a1b9f33 100644 --- a/.github/workflows/deploy-on-pullrequest.yml +++ b/.github/workflows/deploy-on-pullrequest.yml @@ -8,32 +8,31 @@ on: jobs: # This workflow contains a single job called "build" build: - # The type of runner that the job will run on runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - - name: Cache R Packages - #id: cache-r - #-uses: r-lib/action/setup-r@v2 - #-uses: r-lib/actions/setup-r-dependencies@v2 - uses: actions/cache@v3 - with: - path: ${{ envR_LIBS_USER }} - key: r-${{ hashFiles('DESCRIPTION')) }} - - # build the docker image and give it the name main - - name: Build image - run: docker build -t pullrequestimage . - # run the docker image supply the secrets from the github secrets store. - - name: execute - run: > - docker run - -e SHINY_ACC_NAME=${{ secrets.SHINY_ACC_NAME }} - -e TOKEN=${{secrets.SHINY_APP_TOKEN}} - -e SECRET=${{secrets.SHINY_APP_SECRET}} - -e MASTERNAME=Testing - pullrequestimage \ No newline at end of file + - name: Cache R Packages + #id: cache-r + #-uses: r-lib/action/setup-r@v2 + #-uses: r-lib/actions/setup-r-dependencies@v2 + uses: actions/cache@v1 + with: + path: ${{ envR_LIBS_USER }} + key: r-${{ hashFiles('DESCRIPTION')) }} + + # build the docker image and give it the name main + - name: Build image + run: docker build -t pullrequestimage . + # run the docker image supply the secrets from the github secrets store. + - name: execute + run: > + docker run + -e SHINY_ACC_NAME=${{ secrets.SHINY_ACC_NAME }} + -e TOKEN=${{secrets.SHINY_APP_TOKEN}} + -e SECRET=${{secrets.SHINY_APP_SECRET}} + -e MASTERNAME=Testing + pullrequestimage \ No newline at end of file From cb206c74740a02b486404d35c617858d1356970b Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Fri, 14 Apr 2023 16:46:02 -0400 Subject: [PATCH 05/17] Fixes --- .github/workflows/deploy-on-pullrequest.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-on-pullrequest.yml b/.github/workflows/deploy-on-pullrequest.yml index a1b9f33..248eb43 100644 --- a/.github/workflows/deploy-on-pullrequest.yml +++ b/.github/workflows/deploy-on-pullrequest.yml @@ -21,8 +21,13 @@ jobs: #-uses: r-lib/actions/setup-r-dependencies@v2 uses: actions/cache@v1 with: - path: ${{ envR_LIBS_USER }} - key: r-${{ hashFiles('DESCRIPTION')) }} + path: ~/dependencies + key: r-${{ hashFiles('DESCRIPTION') }} + + #- name: Restore cache + # with: + # path: ~/dependencies + # key: # build the docker image and give it the name main - name: Build image From 3b5d98075c4214fd96400ccd008b820feaedfa02 Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Fri, 14 Apr 2023 16:55:17 -0400 Subject: [PATCH 06/17] test caching --- .github/workflows/deploy-on-pullrequest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-on-pullrequest.yml b/.github/workflows/deploy-on-pullrequest.yml index 248eb43..cac3045 100644 --- a/.github/workflows/deploy-on-pullrequest.yml +++ b/.github/workflows/deploy-on-pullrequest.yml @@ -14,6 +14,7 @@ jobs: steps: # Checks-out your repository so your job can access it - uses: actions/checkout@v3 + - uses: r-lib/actions/setup-r@master - name: Cache R Packages #id: cache-r @@ -21,7 +22,7 @@ jobs: #-uses: r-lib/actions/setup-r-dependencies@v2 uses: actions/cache@v1 with: - path: ~/dependencies + path: ${{ env.R_LIBS_USER }} key: r-${{ hashFiles('DESCRIPTION') }} #- name: Restore cache From 322e3d84e7ab38bcbcb63e1748e7d9d50c6edadf Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Fri, 14 Apr 2023 17:05:05 -0400 Subject: [PATCH 07/17] Change version --- .github/workflows/deploy-on-pullrequest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-on-pullrequest.yml b/.github/workflows/deploy-on-pullrequest.yml index cac3045..aaace99 100644 --- a/.github/workflows/deploy-on-pullrequest.yml +++ b/.github/workflows/deploy-on-pullrequest.yml @@ -14,7 +14,7 @@ jobs: steps: # Checks-out your repository so your job can access it - uses: actions/checkout@v3 - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-r@v2 - name: Cache R Packages #id: cache-r From 13694892dbe81b0817ff0d6a463d15cec2e9862d Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Fri, 14 Apr 2023 17:13:21 -0400 Subject: [PATCH 08/17] Arbitrary change to test github action --- .github/workflows/deploy-on-pullrequest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-on-pullrequest.yml b/.github/workflows/deploy-on-pullrequest.yml index aaace99..c3367f1 100644 --- a/.github/workflows/deploy-on-pullrequest.yml +++ b/.github/workflows/deploy-on-pullrequest.yml @@ -29,6 +29,7 @@ jobs: # with: # path: ~/dependencies # key: + # # build the docker image and give it the name main - name: Build image From ceead599ae4cf4cb16af4bbc8fa8ea6c361f46bb Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Fri, 14 Apr 2023 17:32:59 -0400 Subject: [PATCH 09/17] Create github action for caching on main --- .github/workflows/caching.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/caching.yml diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml new file mode 100644 index 0000000..898e283 --- /dev/null +++ b/.github/workflows/caching.yml @@ -0,0 +1,34 @@ +name: update-cache +#When cached from an overhead branch, +#sub branches should refer to overhead branch when checking cache hit + +on: + push: + branches: [main, master] + +jobs: + build-cache: + name: Build Cache + runs-on: ubuntu-latest + + steps: + name: Setup R + uses: r-lib/actions/setup-r@v2 + + name: Checkout Rep + uses: actions/checkout@v2 + + #Cache Dependencies to speed up workflow + name: Cache dependencies + uses: actions/cache@v1 + id: cache + with: + path: ${{ env.R_LIBS_USER }} + key: r-${{ hashFiles('DESCRIPTION') }} + restore-keys: + ${{ env.R_LIBS_USER }} + + #If no cache hit, install dependencies + name: Install Dependencies + if: steps.cache.outputs.cache-hit != 'true' + #run: \ No newline at end of file From a2f2b74fd7836b77d313e108a05479d3de29716b Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Tue, 18 Apr 2023 16:35:42 -0400 Subject: [PATCH 10/17] Create new file for caching and building on main --- .github/workflows/caching.yml | 38 +++++++++++++++++++-- .github/workflows/deploy-on-main-branch.yml | 38 ++++++++++----------- 2 files changed, 55 insertions(+), 21 deletions(-) diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index 898e283..bbec1be 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -1,3 +1,5 @@ +#https://stackoverflow.com/questions/69365200/github-actions-how-to-cache-dependencies-between-workflow-runs-of-different-bra + name: update-cache #When cached from an overhead branch, #sub branches should refer to overhead branch when checking cache hit @@ -7,7 +9,7 @@ on: branches: [main, master] jobs: - build-cache: + cache: name: Build Cache runs-on: ubuntu-latest @@ -31,4 +33,36 @@ jobs: #If no cache hit, install dependencies name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' - #run: \ No newline at end of file + uses: r-lib/actions/setup-r-dependencies@v2 + + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository so your job can access it + - uses: actions/checkout@v2 + - uses: r-lib/actions/setup-r@v2 + + - name: Cache R Packages + #id: cache-r + #-uses: r-lib/action/setup-r@v2 + #-uses: r-lib/actions/setup-r-dependencies@v2 + uses: actions/cache@v1 + with: + path: ${{ env.R_LIBS_USER }} + key: r-${{ hashFiles('DESCRIPTION') }} + + # build the docker image and give it the name main + - name: Build image + run: docker build -t main . + # run the docker image supply the secrets from the github secrets store. + - name: execute + run: > + docker run + -e SHINY_ACC_NAME=${{ secrets.SHINY_ACC_NAME }} + -e TOKEN=${{secrets.SHINY_APP_TOKEN}} + -e SECRET=${{secrets.SHINY_APP_SECRET}} + -e MASTERNAME=${{ secrets.MASTER_NAME }} + main \ No newline at end of file diff --git a/.github/workflows/deploy-on-main-branch.yml b/.github/workflows/deploy-on-main-branch.yml index 01aa321..159fa90 100644 --- a/.github/workflows/deploy-on-main-branch.yml +++ b/.github/workflows/deploy-on-main-branch.yml @@ -1,31 +1,31 @@ -name: Run on push to main +#name: Run on push to main # Controls when the action will run. -on: +#on: # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ main, master ] +# push: +# branches: [ main, master ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: +#jobs: # This workflow contains a single job called "build" - build: +# build: # The type of runner that the job will run on - runs-on: ubuntu-latest +# runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job - steps: +# steps: # Checks-out your repository so your job can access it - - uses: actions/checkout@v2 +# - uses: actions/checkout@v2 # build the docker image and give it the name main - - name: Build image - run: docker build -t main . +# - name: Build image +# run: docker build -t main . # run the docker image supply the secrets from the github secrets store. - - name: execute - run: > - docker run - -e SHINY_ACC_NAME=${{ secrets.SHINY_ACC_NAME }} - -e TOKEN=${{secrets.SHINY_APP_TOKEN}} - -e SECRET=${{secrets.SHINY_APP_SECRET}} - -e MASTERNAME=${{ secrets.MASTER_NAME }} - main \ No newline at end of file +# - name: execute +# run: > +# docker run +# -e SHINY_ACC_NAME=${{ secrets.SHINY_ACC_NAME }} +# -e TOKEN=${{secrets.SHINY_APP_TOKEN}} +# -e SECRET=${{secrets.SHINY_APP_SECRET}} +# -e MASTERNAME=${{ secrets.MASTER_NAME }} +# main \ No newline at end of file From d5c5c64d7556814c3810f9b6dfb6c330ed3f00c2 Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Tue, 18 Apr 2023 16:47:40 -0400 Subject: [PATCH 11/17] Change to run on pull request - Temp fix --- .github/workflows/caching.yml | 13 +++++++------ .github/workflows/deploy-on-pullrequest.yml | 14 +++++++------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index bbec1be..e043e6c 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -5,8 +5,9 @@ name: update-cache #sub branches should refer to overhead branch when checking cache hit on: - push: - branches: [main, master] + #push: + # branches: [main, master] + pull_request: {} jobs: cache: @@ -14,14 +15,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup R + - name: Setup R uses: r-lib/actions/setup-r@v2 - name: Checkout Rep + - name: Checkout Rep uses: actions/checkout@v2 #Cache Dependencies to speed up workflow - name: Cache dependencies + - name: Cache dependencies uses: actions/cache@v1 id: cache with: @@ -31,7 +32,7 @@ jobs: ${{ env.R_LIBS_USER }} #If no cache hit, install dependencies - name: Install Dependencies + - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' uses: r-lib/actions/setup-r-dependencies@v2 diff --git a/.github/workflows/deploy-on-pullrequest.yml b/.github/workflows/deploy-on-pullrequest.yml index c3367f1..9841367 100644 --- a/.github/workflows/deploy-on-pullrequest.yml +++ b/.github/workflows/deploy-on-pullrequest.yml @@ -1,20 +1,20 @@ name: Pull requests # Controls when the action will run. -on: +#on: # Triggers the workflow pull request events - pull_request: {} +# pull_request: {} # A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: +#jobs: # This workflow contains a single job called "build" - build: +# build: runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository so your job can access it - uses: actions/checkout@v3 - - uses: r-lib/actions/setup-r@v2 + #- uses: r-lib/actions/setup-r@v2 - name: Cache R Packages #id: cache-r @@ -35,8 +35,8 @@ jobs: - name: Build image run: docker build -t pullrequestimage . # run the docker image supply the secrets from the github secrets store. - - name: execute - run: > +# - name: execute +# run: > docker run -e SHINY_ACC_NAME=${{ secrets.SHINY_ACC_NAME }} -e TOKEN=${{secrets.SHINY_APP_TOKEN}} From 4219bc3de3abb061d8df2b700796b49f6f51a588 Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Tue, 18 Apr 2023 17:00:47 -0400 Subject: [PATCH 12/17] Test changes --- .github/workflows/caching.yml | 40 ++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index e043e6c..307252c 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -15,26 +15,28 @@ jobs: runs-on: ubuntu-latest steps: - - name: Setup R - uses: r-lib/actions/setup-r@v2 + #- name: Setup R + # uses: r-lib/actions/setup-r@v2 - name: Checkout Rep - uses: actions/checkout@v2 + uses: actions/checkout@v3 + uses: r-lib/actions/setup-r@v2 + uses: r-lib/actions/setup-r-dependencies@v2 #Cache Dependencies to speed up workflow - - name: Cache dependencies - uses: actions/cache@v1 - id: cache - with: - path: ${{ env.R_LIBS_USER }} - key: r-${{ hashFiles('DESCRIPTION') }} - restore-keys: - ${{ env.R_LIBS_USER }} +# - name: Cache dependencies +# uses: actions/cache@v1 +# id: cache +# with: +# path: ${{ env.R_LIBS_USER }} +# key: r-${{ hashFiles('DESCRIPTION') }} +# restore-keys: +# ${{ env.R_LIBS_USER }} #If no cache hit, install dependencies - - name: Install Dependencies - if: steps.cache.outputs.cache-hit != 'true' - uses: r-lib/actions/setup-r-dependencies@v2 +# - name: Install Dependencies +# if: steps.cache.outputs.cache-hit != 'true' +# uses: r-lib/actions/setup-r-dependencies@v2 build: # The type of runner that the job will run on @@ -46,14 +48,14 @@ jobs: - uses: actions/checkout@v2 - uses: r-lib/actions/setup-r@v2 - - name: Cache R Packages + # - name: Cache R Packages #id: cache-r #-uses: r-lib/action/setup-r@v2 #-uses: r-lib/actions/setup-r-dependencies@v2 - uses: actions/cache@v1 - with: - path: ${{ env.R_LIBS_USER }} - key: r-${{ hashFiles('DESCRIPTION') }} + # uses: actions/cache@v1 + # with: + # path: ${{ env.R_LIBS_USER }} + # key: r-${{ hashFiles('DESCRIPTION') }} # build the docker image and give it the name main - name: Build image From 15349940ba1f676d981d47fd3b65800430c19c29 Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Tue, 18 Apr 2023 17:01:44 -0400 Subject: [PATCH 13/17] Syntax fix --- .github/workflows/caching.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index 307252c..4685663 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -18,10 +18,9 @@ jobs: #- name: Setup R # uses: r-lib/actions/setup-r@v2 - - name: Checkout Rep - uses: actions/checkout@v3 - uses: r-lib/actions/setup-r@v2 - uses: r-lib/actions/setup-r-dependencies@v2 + - uses: actions/checkout@v3 + - uses: r-lib/actions/setup-r@v2 + - uses: r-lib/actions/setup-r-dependencies@v2 #Cache Dependencies to speed up workflow # - name: Cache dependencies From e433f17c7f2fb11b340617bbca3bfd9b33ede440 Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Tue, 18 Apr 2023 17:12:31 -0400 Subject: [PATCH 14/17] Temp changes --- .github/workflows/caching.yml | 43 +++++++++++++---------------------- Dockerfile | 4 ++-- 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index 4685663..f212120 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -18,24 +18,23 @@ jobs: #- name: Setup R # uses: r-lib/actions/setup-r@v2 - - uses: actions/checkout@v3 - - uses: r-lib/actions/setup-r@v2 - - uses: r-lib/actions/setup-r-dependencies@v2 + - name: Checkout Rep + uses: actions/checkout@v2 #Cache Dependencies to speed up workflow -# - name: Cache dependencies -# uses: actions/cache@v1 -# id: cache -# with: -# path: ${{ env.R_LIBS_USER }} -# key: r-${{ hashFiles('DESCRIPTION') }} -# restore-keys: -# ${{ env.R_LIBS_USER }} + - name: Cache dependencies + uses: actions/cache@v1 + id: cache + with: + path: dependencies #${{ env.R_LIBS_USER }} + key: r-${{ hashFiles('DESCRIPTION') }} + # restore-keys: + # ${{ env.R_LIBS_USER }} #If no cache hit, install dependencies -# - name: Install Dependencies -# if: steps.cache.outputs.cache-hit != 'true' -# uses: r-lib/actions/setup-r-dependencies@v2 + - name: Install Dependencies + if: steps.cache.outputs.cache-hit != 'true' + uses: r-lib/actions/setup-r-dependencies@v2 build: # The type of runner that the job will run on @@ -45,23 +44,13 @@ jobs: steps: # Checks-out your repository so your job can access it - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v2 - - # - name: Cache R Packages - #id: cache-r - #-uses: r-lib/action/setup-r@v2 - #-uses: r-lib/actions/setup-r-dependencies@v2 - # uses: actions/cache@v1 - # with: - # path: ${{ env.R_LIBS_USER }} - # key: r-${{ hashFiles('DESCRIPTION') }} # build the docker image and give it the name main - - name: Build image - run: docker build -t main . +# - name: Build image +# run: docker build -t main . # run the docker image supply the secrets from the github secrets store. - name: execute - run: > +# run: > docker run -e SHINY_ACC_NAME=${{ secrets.SHINY_ACC_NAME }} -e TOKEN=${{secrets.SHINY_APP_TOKEN}} diff --git a/Dockerfile b/Dockerfile index dddb0b9..911c346 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,9 @@ WORKDIR /home/shinyusr #RUN install2.r rsconnect leaflet shiny shinydashboard RColorBrewer jsonlite rgdal \ # ggplot2 raster elevatr rgeos leaflet rgl bmp httr countrycode sqldf arrow progress -RUN install2.r remotes +#RUN install2.r remotes COPY DESCRIPTION . -RUN Rscript -e "remotes::install_deps()" +#RUN Rscript -e "remotes::install_deps()" COPY Deployment . CMD Rscript deploy.R \ No newline at end of file From 6065621d331f9d3e498022db6f71b460e4cbe2db Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Tue, 18 Apr 2023 17:16:04 -0400 Subject: [PATCH 15/17] Remove comments --- .github/workflows/caching.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index f212120..d2b35bd 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -46,11 +46,11 @@ jobs: - uses: actions/checkout@v2 # build the docker image and give it the name main -# - name: Build image -# run: docker build -t main . + - name: Build image + run: docker build -t main . # run the docker image supply the secrets from the github secrets store. - name: execute -# run: > + run: > docker run -e SHINY_ACC_NAME=${{ secrets.SHINY_ACC_NAME }} -e TOKEN=${{secrets.SHINY_APP_TOKEN}} From 81c4b6ab6b7f42bae6f3e7ca3cbf255daefbc45c Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Thu, 20 Apr 2023 10:49:56 -0400 Subject: [PATCH 16/17] Test caching --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 911c346..4ad1c9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ #https://blog.sellorm.com/2021/04/25/shiny-app-in-docker/ FROM rocker/shiny:4.2.3 -WORKDIR /home/shinyusr +#WORKDIR /home/shinyusr #RUN install2.r rsconnect leaflet shiny shinydashboard RColorBrewer jsonlite rgdal \ # ggplot2 raster elevatr rgeos leaflet rgl bmp httr countrycode sqldf arrow progress -#RUN install2.r remotes +RUN install2.r remotes COPY DESCRIPTION . -#RUN Rscript -e "remotes::install_deps()" +RUN Rscript -e "remotes::install_deps()" COPY Deployment . CMD Rscript deploy.R \ No newline at end of file From 6f25e12428064ac8e0743af7ee6bb0c88da6423a Mon Sep 17 00:00:00 2001 From: Zxhjlk Date: Thu, 20 Apr 2023 10:53:36 -0400 Subject: [PATCH 17/17] Readded wokrdir --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4ad1c9b..dddb0b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ #https://blog.sellorm.com/2021/04/25/shiny-app-in-docker/ FROM rocker/shiny:4.2.3 -#WORKDIR /home/shinyusr +WORKDIR /home/shinyusr #RUN install2.r rsconnect leaflet shiny shinydashboard RColorBrewer jsonlite rgdal \ # ggplot2 raster elevatr rgeos leaflet rgl bmp httr countrycode sqldf arrow progress