From a863c5236fdd6460ec7c2f4c2fbf6816ad7b54f0 Mon Sep 17 00:00:00 2001 From: andyphancode Date: Sun, 16 Jun 2024 23:19:07 -0700 Subject: [PATCH 01/14] update to not use set-output, added test PAT --- .github/workflows/check-gh-pages-version.yml | 4 ++-- .github/workflows/check-ruby-version.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-gh-pages-version.yml b/.github/workflows/check-gh-pages-version.yml index eea44c9..52af316 100644 --- a/.github/workflows/check-gh-pages-version.yml +++ b/.github/workflows/check-gh-pages-version.yml @@ -24,7 +24,7 @@ jobs: - name: Check for modified files id: git-check - run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") + run: echo "modified=$([ -z \"$(git status --porcelain)\" ] && echo false || echo true)" >> $GITHUB_OUTPUT - name: Commit latest GH-Pages Gem release version if: steps.git-check.outputs.modified == 'true' @@ -42,4 +42,4 @@ jobs: --body "GitHub Pages is now using **v${{ env.PAGES_RELEASE_VERSION }}** of the GitHub Pages Ruby Gem. You are using **v${{ env.PAGES_CURRENT_VERSION }}**. Please refer to the [ghpages-docker Wiki](https://github.com/hackforla/ghpages-docker/wiki#how-do-you-update-ghpages-docker) for instructions on how to update." --label "feature: maintenance,feature: docker,role: Site Reliability Engineer,size: 0.5pt"' env: - GH_TOKEN: ${{ secrets.Daniel_Ridge_PAT }} + GH_TOKEN: ${{ secrets.test_Daniel_Ridge_PAT }} diff --git a/.github/workflows/check-ruby-version.yml b/.github/workflows/check-ruby-version.yml index 2f0a8ff..818fdf7 100644 --- a/.github/workflows/check-ruby-version.yml +++ b/.github/workflows/check-ruby-version.yml @@ -26,7 +26,7 @@ jobs: - name: Check for modified files id: git-check - run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") + run: echo "modified=$([ -z \"$(git status --porcelain)\" ] && echo false || echo true)" >> $GITHUB_OUTPUT - name: Commit latest Ruby release version if: steps.git-check.outputs.modified == 'true' @@ -44,4 +44,4 @@ jobs: --body "GitHub Pages is now using **v${{ env.RUBY_RELEASE_VERSION }}** of Ruby. You are using **v${{ env.RUBY_CURRENT_VERSION }}**. Please refer to the [ghpages-docker Wiki](https://github.com/hackforla/ghpages-docker/wiki#how-do-you-update-ghpages-docker) for instructions on how to update." --label "feature: maintenance,feature: docker,role: Site Reliability Engineer,size: 0.5pt"' env: - GH_TOKEN: ${{ secrets.Daniel_Ridge_PAT }} + GH_TOKEN: ${{ secrets.test_Daniel_Ridge_PAT }} From 4ef915876239c06ec29cf9a44322e3f21c4ddd7d Mon Sep 17 00:00:00 2001 From: andyphancode Date: Sun, 16 Jun 2024 23:19:32 -0700 Subject: [PATCH 02/14] removed Node 16 dependency --- .github/workflows/check-gh-pages-version.yml | 2 +- .github/workflows/check-ruby-version.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-gh-pages-version.yml b/.github/workflows/check-gh-pages-version.yml index 52af316..7637b64 100644 --- a/.github/workflows/check-gh-pages-version.yml +++ b/.github/workflows/check-gh-pages-version.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out Daniel Ridge repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set ENV variable for current ghpages-docker version number run: echo "PAGES_CURRENT_VERSION=$(cat release-versions/github-pages-gem.txt)" >> $GITHUB_ENV diff --git a/.github/workflows/check-ruby-version.yml b/.github/workflows/check-ruby-version.yml index 818fdf7..d8d6dd3 100644 --- a/.github/workflows/check-ruby-version.yml +++ b/.github/workflows/check-ruby-version.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out Daniel Ridge repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set ENV variable for current Ruby version number run: echo "RUBY_CURRENT_VERSION=$(cat release-versions/ruby.txt)" >> $GITHUB_ENV From dfda295f126949ea97489e9fc457ec9d61abaa29 Mon Sep 17 00:00:00 2001 From: andyphancode Date: Sun, 16 Jun 2024 23:35:52 -0700 Subject: [PATCH 03/14] Trigger workflow for testing --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6464739..edeee09 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,5 @@ Specifically, there are two dependencies that need to be checked: **Ruby** and t Each workflow functions by reading the version number for its respective piece of software from the JSON version of [GitHub's dependency version list](https://pages.github.com/versions.json) and comparing it to the version number currently being used by `ghpages-docker`, which is stored in a text file in the `release-versions` folder in the root of the repo. If there is a change, the workflow opens an issue in `hackforla/ops` notifying the Ops team that an update is required. It also writes the new version number to the appropriate text file in `release-versions` and commits the change. Note that this means that **by the time an issue is opened, the version number in the relevant text file already reflects the new version used by GitHub Pages, not the version currently used in `ghpages-docker`**. Workflows and README written by [ericvennemeyer](https://github.com/ericvennemeyer) for [hackforla](https://github.com/hackforla) + +Test: Trigger workflow for testing \ No newline at end of file From 2f21453bcb751ab2ff34305a3db1e59ac90dcc64 Mon Sep 17 00:00:00 2001 From: andyphancode Date: Mon, 17 Jun 2024 00:02:56 -0700 Subject: [PATCH 04/14] removed workflow test in readme mistaken the workflows to run automatically on changes to branch --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index edeee09..28a5720 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,4 @@ Specifically, there are two dependencies that need to be checked: **Ruby** and t Each workflow functions by reading the version number for its respective piece of software from the JSON version of [GitHub's dependency version list](https://pages.github.com/versions.json) and comparing it to the version number currently being used by `ghpages-docker`, which is stored in a text file in the `release-versions` folder in the root of the repo. If there is a change, the workflow opens an issue in `hackforla/ops` notifying the Ops team that an update is required. It also writes the new version number to the appropriate text file in `release-versions` and commits the change. Note that this means that **by the time an issue is opened, the version number in the relevant text file already reflects the new version used by GitHub Pages, not the version currently used in `ghpages-docker`**. -Workflows and README written by [ericvennemeyer](https://github.com/ericvennemeyer) for [hackforla](https://github.com/hackforla) - -Test: Trigger workflow for testing \ No newline at end of file +Workflows and README written by [ericvennemeyer](https://github.com/ericvennemeyer) for [hackforla](https://github.com/hackforla) \ No newline at end of file From a830e9542981acfb39c45dcf3761666d382a7d22 Mon Sep 17 00:00:00 2001 From: andyphancode Date: Mon, 17 Jun 2024 00:03:34 -0700 Subject: [PATCH 05/14] updated 'Check for modified files' to use Env instead of GH-output --- .github/workflows/check-gh-pages-version.yml | 6 +++--- .github/workflows/check-ruby-version.yml | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-gh-pages-version.yml b/.github/workflows/check-gh-pages-version.yml index 7637b64..5de88a2 100644 --- a/.github/workflows/check-gh-pages-version.yml +++ b/.github/workflows/check-gh-pages-version.yml @@ -24,10 +24,10 @@ jobs: - name: Check for modified files id: git-check - run: echo "modified=$([ -z \"$(git status --porcelain)\" ] && echo false || echo true)" >> $GITHUB_OUTPUT + run: echo "modified=$([ -z \"$(git status --porcelain)\" ] && echo false || echo true)" >> $GITHUB_ENV - name: Commit latest GH-Pages Gem release version - if: steps.git-check.outputs.modified == 'true' + if: env.modified == 'true' run: | git config --global user.name 'Daniel Ridge' git config --global user.email 'Daniel.Ridge@hackforla.org' @@ -35,7 +35,7 @@ jobs: git push - name: Create issue to update GH-Pages gem - if: steps.git-check.outputs.modified == 'true' + if: env.modified == 'true' run: 'gh issue create --repo github.com/hackforla/ops --title "GHPAGES-DOCKER needs to be updated" diff --git a/.github/workflows/check-ruby-version.yml b/.github/workflows/check-ruby-version.yml index d8d6dd3..420b301 100644 --- a/.github/workflows/check-ruby-version.yml +++ b/.github/workflows/check-ruby-version.yml @@ -26,10 +26,10 @@ jobs: - name: Check for modified files id: git-check - run: echo "modified=$([ -z \"$(git status --porcelain)\" ] && echo false || echo true)" >> $GITHUB_OUTPUT + run: echo "modified=$([ -z \"$(git status --porcelain)\" ] && echo false || echo true)" >> $GITHUB_ENV - name: Commit latest Ruby release version - if: steps.git-check.outputs.modified == 'true' + if: env.modified == 'true' run: | git config --global user.name 'Daniel Ridge' git config --global user.email 'Daniel.Ridge@hackforla.org' @@ -37,7 +37,7 @@ jobs: git push - name: Create issue to update Ruby - if: steps.git-check.outputs.modified == 'true' + if: env.modified == 'true' run: 'gh issue create --repo github.com/hackforla/ops --title "GHPAGES-DOCKER needs to be updated" @@ -45,3 +45,5 @@ jobs: --label "feature: maintenance,feature: docker,role: Site Reliability Engineer,size: 0.5pt"' env: GH_TOKEN: ${{ secrets.test_Daniel_Ridge_PAT }} + + From 2951d6abb1f6a2badf2f1016a820d475ee32a5bd Mon Sep 17 00:00:00 2001 From: andyphancode Date: Mon, 17 Jun 2024 00:12:58 -0700 Subject: [PATCH 06/14] try adjusted condition statement --- .github/workflows/check-gh-pages-version.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-gh-pages-version.yml b/.github/workflows/check-gh-pages-version.yml index 5de88a2..ea1c210 100644 --- a/.github/workflows/check-gh-pages-version.yml +++ b/.github/workflows/check-gh-pages-version.yml @@ -24,7 +24,12 @@ jobs: - name: Check for modified files id: git-check - run: echo "modified=$([ -z \"$(git status --porcelain)\" ] && echo false || echo true)" >> $GITHUB_ENV + run: | + if [ -z "$(git status --porcelain)" ]; then + echo "modified=false" >> $GITHUB_ENV + else + echo "modified=true" >> $GITHUB_ENV + fi - name: Commit latest GH-Pages Gem release version if: env.modified == 'true' From 251ec6030c4be9f4dabc4094d557ab5e1c8e5728 Mon Sep 17 00:00:00 2001 From: andyphancode Date: Mon, 17 Jun 2024 00:15:44 -0700 Subject: [PATCH 07/14] changed conditional statement for modified variable --- .github/workflows/check-ruby-version.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-ruby-version.yml b/.github/workflows/check-ruby-version.yml index 420b301..41cb442 100644 --- a/.github/workflows/check-ruby-version.yml +++ b/.github/workflows/check-ruby-version.yml @@ -26,7 +26,12 @@ jobs: - name: Check for modified files id: git-check - run: echo "modified=$([ -z \"$(git status --porcelain)\" ] && echo false || echo true)" >> $GITHUB_ENV + run: | + if [ -z "$(git status --porcelain)" ]; then + echo "modified=false" >> $GITHUB_ENV + else + echo "modified=true" >> $GITHUB_ENV + fi - name: Commit latest Ruby release version if: env.modified == 'true' From a127eb2521fe433bf7dc396cbdbf7ba1697b0d1c Mon Sep 17 00:00:00 2001 From: andyphancode Date: Mon, 17 Jun 2024 00:22:59 -0700 Subject: [PATCH 08/14] restored original secrets --- .github/workflows/check-gh-pages-version.yml | 2 +- .github/workflows/check-ruby-version.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-gh-pages-version.yml b/.github/workflows/check-gh-pages-version.yml index ea1c210..e3c54ab 100644 --- a/.github/workflows/check-gh-pages-version.yml +++ b/.github/workflows/check-gh-pages-version.yml @@ -47,4 +47,4 @@ jobs: --body "GitHub Pages is now using **v${{ env.PAGES_RELEASE_VERSION }}** of the GitHub Pages Ruby Gem. You are using **v${{ env.PAGES_CURRENT_VERSION }}**. Please refer to the [ghpages-docker Wiki](https://github.com/hackforla/ghpages-docker/wiki#how-do-you-update-ghpages-docker) for instructions on how to update." --label "feature: maintenance,feature: docker,role: Site Reliability Engineer,size: 0.5pt"' env: - GH_TOKEN: ${{ secrets.test_Daniel_Ridge_PAT }} + GH_TOKEN: ${{ secrets.Daniel_Ridge_PAT }} diff --git a/.github/workflows/check-ruby-version.yml b/.github/workflows/check-ruby-version.yml index 41cb442..0d508e2 100644 --- a/.github/workflows/check-ruby-version.yml +++ b/.github/workflows/check-ruby-version.yml @@ -49,6 +49,6 @@ jobs: --body "GitHub Pages is now using **v${{ env.RUBY_RELEASE_VERSION }}** of Ruby. You are using **v${{ env.RUBY_CURRENT_VERSION }}**. Please refer to the [ghpages-docker Wiki](https://github.com/hackforla/ghpages-docker/wiki#how-do-you-update-ghpages-docker) for instructions on how to update." --label "feature: maintenance,feature: docker,role: Site Reliability Engineer,size: 0.5pt"' env: - GH_TOKEN: ${{ secrets.test_Daniel_Ridge_PAT }} + GH_TOKEN: ${{ secrets.Daniel_Ridge_PAT }} From 0ce0791f77d90b1ffb0885684927c5a8059d6490 Mon Sep 17 00:00:00 2001 From: andyphancode Date: Mon, 1 Jul 2024 16:37:59 -0700 Subject: [PATCH 09/14] test attempt with outdated gh-pages-gem --- .github/workflows/check-gh-pages-version.yml | 2 +- .github/workflows/check-ruby-version.yml | 2 +- release-versions/github-pages-gem.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-gh-pages-version.yml b/.github/workflows/check-gh-pages-version.yml index e3c54ab..ea1c210 100644 --- a/.github/workflows/check-gh-pages-version.yml +++ b/.github/workflows/check-gh-pages-version.yml @@ -47,4 +47,4 @@ jobs: --body "GitHub Pages is now using **v${{ env.PAGES_RELEASE_VERSION }}** of the GitHub Pages Ruby Gem. You are using **v${{ env.PAGES_CURRENT_VERSION }}**. Please refer to the [ghpages-docker Wiki](https://github.com/hackforla/ghpages-docker/wiki#how-do-you-update-ghpages-docker) for instructions on how to update." --label "feature: maintenance,feature: docker,role: Site Reliability Engineer,size: 0.5pt"' env: - GH_TOKEN: ${{ secrets.Daniel_Ridge_PAT }} + GH_TOKEN: ${{ secrets.test_Daniel_Ridge_PAT }} diff --git a/.github/workflows/check-ruby-version.yml b/.github/workflows/check-ruby-version.yml index 0d508e2..41cb442 100644 --- a/.github/workflows/check-ruby-version.yml +++ b/.github/workflows/check-ruby-version.yml @@ -49,6 +49,6 @@ jobs: --body "GitHub Pages is now using **v${{ env.RUBY_RELEASE_VERSION }}** of Ruby. You are using **v${{ env.RUBY_CURRENT_VERSION }}**. Please refer to the [ghpages-docker Wiki](https://github.com/hackforla/ghpages-docker/wiki#how-do-you-update-ghpages-docker) for instructions on how to update." --label "feature: maintenance,feature: docker,role: Site Reliability Engineer,size: 0.5pt"' env: - GH_TOKEN: ${{ secrets.Daniel_Ridge_PAT }} + GH_TOKEN: ${{ secrets.test_Daniel_Ridge_PAT }} diff --git a/release-versions/github-pages-gem.txt b/release-versions/github-pages-gem.txt index 71d936f..2c36bbd 100644 --- a/release-versions/github-pages-gem.txt +++ b/release-versions/github-pages-gem.txt @@ -1 +1 @@ -231 +227 From 46eca52536f747ce875077bc8070469f00f6382e Mon Sep 17 00:00:00 2001 From: Daniel Ridge Date: Mon, 1 Jul 2024 23:38:35 +0000 Subject: [PATCH 10/14] New release version --- release-versions/github-pages-gem.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-versions/github-pages-gem.txt b/release-versions/github-pages-gem.txt index 2c36bbd..71d936f 100644 --- a/release-versions/github-pages-gem.txt +++ b/release-versions/github-pages-gem.txt @@ -1 +1 @@ -227 +231 From 18f582016b8f8a3af7a05edeea4525c3f417e19b Mon Sep 17 00:00:00 2001 From: andyphancode Date: Mon, 1 Jul 2024 16:44:43 -0700 Subject: [PATCH 11/14] return to non-test --- .github/workflows/check-gh-pages-version.yml | 2 +- .github/workflows/check-ruby-version.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-gh-pages-version.yml b/.github/workflows/check-gh-pages-version.yml index ea1c210..e3c54ab 100644 --- a/.github/workflows/check-gh-pages-version.yml +++ b/.github/workflows/check-gh-pages-version.yml @@ -47,4 +47,4 @@ jobs: --body "GitHub Pages is now using **v${{ env.PAGES_RELEASE_VERSION }}** of the GitHub Pages Ruby Gem. You are using **v${{ env.PAGES_CURRENT_VERSION }}**. Please refer to the [ghpages-docker Wiki](https://github.com/hackforla/ghpages-docker/wiki#how-do-you-update-ghpages-docker) for instructions on how to update." --label "feature: maintenance,feature: docker,role: Site Reliability Engineer,size: 0.5pt"' env: - GH_TOKEN: ${{ secrets.test_Daniel_Ridge_PAT }} + GH_TOKEN: ${{ secrets.Daniel_Ridge_PAT }} diff --git a/.github/workflows/check-ruby-version.yml b/.github/workflows/check-ruby-version.yml index 41cb442..0d508e2 100644 --- a/.github/workflows/check-ruby-version.yml +++ b/.github/workflows/check-ruby-version.yml @@ -49,6 +49,6 @@ jobs: --body "GitHub Pages is now using **v${{ env.RUBY_RELEASE_VERSION }}** of Ruby. You are using **v${{ env.RUBY_CURRENT_VERSION }}**. Please refer to the [ghpages-docker Wiki](https://github.com/hackforla/ghpages-docker/wiki#how-do-you-update-ghpages-docker) for instructions on how to update." --label "feature: maintenance,feature: docker,role: Site Reliability Engineer,size: 0.5pt"' env: - GH_TOKEN: ${{ secrets.test_Daniel_Ridge_PAT }} + GH_TOKEN: ${{ secrets.Daniel_Ridge_PAT }} From 4979f2914c4d2b9e233426a95c4691ec0effdd75 Mon Sep 17 00:00:00 2001 From: andyphancode Date: Mon, 8 Jul 2024 19:44:43 -0700 Subject: [PATCH 12/14] changed version to prompt an issue creation --- release-versions/github-pages-gem.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-versions/github-pages-gem.txt b/release-versions/github-pages-gem.txt index 71d936f..2c36bbd 100644 --- a/release-versions/github-pages-gem.txt +++ b/release-versions/github-pages-gem.txt @@ -1 +1 @@ -231 +227 From f69e44b020eb9a36eebf1495fcb44a2d369708e0 Mon Sep 17 00:00:00 2001 From: Daniel Ridge Date: Tue, 9 Jul 2024 12:37:41 +0000 Subject: [PATCH 13/14] New release version --- release-versions/github-pages-gem.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-versions/github-pages-gem.txt b/release-versions/github-pages-gem.txt index 2c36bbd..71d936f 100644 --- a/release-versions/github-pages-gem.txt +++ b/release-versions/github-pages-gem.txt @@ -1 +1 @@ -227 +231 From d05d41a1edb6916e335ec5ebd3e54dfd9ec7019f Mon Sep 17 00:00:00 2001 From: andyphancode Date: Tue, 9 Jul 2024 16:17:26 -0700 Subject: [PATCH 14/14] version rewind for merge --- release-versions/github-pages-gem.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-versions/github-pages-gem.txt b/release-versions/github-pages-gem.txt index 71d936f..2c36bbd 100644 --- a/release-versions/github-pages-gem.txt +++ b/release-versions/github-pages-gem.txt @@ -1 +1 @@ -231 +227