diff --git a/.github/workflows/check-gh-pages-version.yml b/.github/workflows/check-gh-pages-version.yml index eea44c9..e3c54ab 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 @@ -24,10 +24,15 @@ jobs: - name: Check for modified files id: git-check - run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") + 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: 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 +40,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 2f0a8ff..0d508e2 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 @@ -26,10 +26,15 @@ jobs: - name: Check for modified files id: git-check - run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") + 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: 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 +42,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 +50,5 @@ jobs: --label "feature: maintenance,feature: docker,role: Site Reliability Engineer,size: 0.5pt"' env: GH_TOKEN: ${{ secrets.Daniel_Ridge_PAT }} + + diff --git a/README.md b/README.md index 6464739..28a5720 100644 --- a/README.md +++ b/README.md @@ -7,4 +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) +Workflows and README written by [ericvennemeyer](https://github.com/ericvennemeyer) for [hackforla](https://github.com/hackforla) \ No newline at end of file diff --git a/release-versions/github-pages-gem.txt b/release-versions/github-pages-gem.txt index 7c022ae..2c36bbd 100644 --- a/release-versions/github-pages-gem.txt +++ b/release-versions/github-pages-gem.txt @@ -1 +1 @@ -232 +227