Closed FernandoArteaga closed 1 year ago
Exploring how to get this action working, I tried using pretty much the same code as you. I ended up with the same error. Luckily, comparing it with another example code, I figured out that the ref line is causing this error. To fix it change the .sha with .ref. Hope this helps.
Working code:
name: 'Bump Version'
on:
push:
branches:
- 'main'
jobs:
bump-version:
name: 'Bump version on main'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 'Checkout source code'
uses: 'actions/checkout@v3'
with:
ref: ${{ github.ref }}
- name: 'cat package.json'
run: cat ./package.json
- name: 'Automated Version Bump'
id: version-bump
uses: 'phips28/gh-action-bump-version@master'
with:
tag-prefix: 'v'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'cat package.json'
run: cat ./package.json
- name: 'Output Step'
env:
NEW_TAG: ${{ steps.version-bump.outputs.newTag }}
run: echo "new tag $NEW_TAG"
Correct, as its configured here: https://github.com/phips28/gh-action-bump-version/blob/25cd8ffb8ec95f16f83a8dac9557a845e4fa9e21/.github/workflows/push.yml#L17
Error
When the workflow is run I always get the same error:
Configuration
This is my current workflow, I just followed your README file.