diff --git a/README.md b/README.md index 9a78ff0..85636e5 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ jobs: with: fetch-depth: 0 # Let's get all the branches - name: Update to step 1 - uses: skills/action-update-step@v1 + uses: skills/action-update-step@v2 with: token: ${{ secrets.GITHUB_TOKEN }} from_step: 0 diff --git a/action.yml b/action.yml index be7f903..05b6656 100644 --- a/action.yml +++ b/action.yml @@ -20,6 +20,12 @@ runs: using: composite steps: - shell: bash + env: + GITHUB_TOKEN: ${{ inputs.token }} + FROM_STEP: ${{ inputs.from_step }} + TO_STEP: ${{ inputs.to_step }} + BRANCH_NAME: ${{ inputs.branch_name }} + BASE_BRANCH_NAME: ${{ inputs.base_branch_name }} run: | echo "Check that all required env variables are set" if [ -z "$TO_STEP" ] @@ -39,7 +45,7 @@ runs: fi echo "Check that we are on FROM_STEP" - if [ "$(cat .github/script/STEP)" != $FROM_STEP ] + if [ "$(cat .github/steps/-step.txt)" != $FROM_STEP ] then echo "Current step is not $FROM_STEP" exit 0 @@ -48,28 +54,20 @@ runs: echo "Make sure we are on the base branch ($BASE_BRANCH_NAME)" git checkout $BASE_BRANCH_NAME - echo "Remove 'open' from any
tags" - sed -i.tmp -r 's/
/
/g' README.md - - echo "Add 'open' to step TO_STEP" - sed -i.tmp -r "s/
/
/g" README.md - - echo "Update all HTML comments to hide everything" - sed -i.tmp -r 's///endstep\1-->/g' README.md + echo "Update the step to TO_STEP" + NEXT_STEP=$(cat .github/steps/$TO_STEP-*.md) + HEADER=$(awk '/
/,/<\/header>/' README.md) + FOOTER=$(awk '/