Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/check-gh-pages-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,18 +24,23 @@ 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 '[email protected]'
git commit -am "New release version"
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"
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/check-ruby-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,22 +26,29 @@ 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 '[email protected]'
git commit -am "New release version"
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"
--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 }}


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion release-versions/github-pages-gem.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
232
227