Bump follow-redirects from 1.13.0 to 1.15.4 #16
Workflow file for this run
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
name: Auto update readme for code changes | |
on: | |
# This workflow uses the pull_request trigger which prevents write permissions and secrets | |
# access to the target repository from public forks. This should remain as a pull_request | |
# trigger because checkout, build, format and checking for changes do not need elevated | |
# permissions to the repository. The reduced permissions for public forks is adequate. | |
# Since this will commit readme/recompile changes back to the branch, special attention | |
# should be paid to changes made to this workflow when reviewing the PR and granting | |
# permission to first time contributors to run the workflow. | |
pull_request: | |
# Don't include any specific paths here so we always get a build that produces a status | |
# check that our Branch Protection Rules can use. Having a status check also allows us | |
# to require that branches be up to date before they are merged. | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- name: Check for code changes to the action | |
id: action-code | |
uses: im-open/did-custom-action-code-change@v1 | |
with: | |
files-with-code: 'action.yml,index.js' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get the next version for the readme if there are code changes to the action | |
if: steps.action-code.outputs.HAS_CHANGES == 'true' | |
id: version | |
uses: im-open/git-version-lite@v2 | |
with: | |
create-ref: false | |
default-release-type: major | |
- name: Update readme with next version if there are code changes to the action | |
if: steps.action-code.outputs.HAS_CHANGES == 'true' | |
uses: im-open/update-action-version-in-file@v1 | |
with: | |
file-to-update: './README.md' | |
action-name: ${{ github.repository }} | |
updated-version: ${{ steps.version.outputs.NEXT_MAJOR_VERSION }} | |
- name: Commit unstaged readme changes if there are code changes to the action | |
if: steps.action-code.outputs.HAS_CHANGES == 'true' | |
run: | | |
if [[ "$(git status --porcelain)" != "" ]]; then | |
echo "There are changes to commit" | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "Update readme with next version." | |
git push origin HEAD:${{ github.head_ref }} | |
else | |
echo "There were no changes to commit" | |
fi |