diff --git a/.github/workflows/generate-gif-manual.yml b/.github/workflows/generate-gif-manual.yml index 72638f1..a6b0126 100644 --- a/.github/workflows/generate-gif-manual.yml +++ b/.github/workflows/generate-gif-manual.yml @@ -13,15 +13,13 @@ jobs: id: check_changes run: | if git diff --quiet HEAD^ HEAD -- src/; then - echo "No changes in the src folder." - echo "::set-output name=changed::false" + echo "CHANGED=false" >> $GITHUB_ENV else - echo "Changes detected in the src folder." - echo "::set-output name=changed::true" + echo "CHANGED=true" >> $GITHUB_ENV fi - name: Generate GIF from Website - if: steps.check_changes.outputs.changed == 'true' + if: env.CHANGED == 'true' uses: PabloLec/website-to-gif@2.1.1 with: url: "https://mrtysn.github.io/cv/" @@ -37,20 +35,19 @@ jobs: start_delay: 4000 - name: Commit GIF to the Repository - if: steps.check_changes.outputs.changed == 'true' + if: env.CHANGED == 'true' id: commit run: | git config --global user.name "${{ github.actor }}" git config --global user.email "${{ github.actor }}@users.noreply.github.com" git add . if git diff-index --quiet HEAD; then - echo "No changes to commit." - echo "::set-output name=changed_commit::false" + echo "CHANGED_COMMIT=false" >> $GITHUB_ENV else git commit -m 'Automatically generate GIF of the CV website' - echo "::set-output name=changed_commit::true" + echo "CHANGED_COMMIT=true" >> $GITHUB_ENV fi - name: Push changes - if: steps.commit.outputs.changed_commit == 'true' + if: env.CHANGED_COMMIT == 'true' run: git push diff --git a/.github/workflows/generate-gif.yml b/.github/workflows/generate-gif.yml index a308324..020b3de 100644 --- a/.github/workflows/generate-gif.yml +++ b/.github/workflows/generate-gif.yml @@ -15,15 +15,13 @@ jobs: id: check_changes run: | if git diff --quiet HEAD^ HEAD -- src/; then - echo "No changes in the src folder." - echo "::set-output name=changed::false" + echo "CHANGED=false" >> $GITHUB_ENV else - echo "Changes detected in the src folder." - echo "::set-output name=changed::true" + echo "CHANGED=true" >> $GITHUB_ENV fi - name: Generate GIF from Website - if: steps.check_changes.outputs.changed == 'true' + if: env.CHANGED == 'true' uses: PabloLec/website-to-gif@2.1.1 with: url: "https://mrtysn.github.io/cv/" @@ -39,20 +37,19 @@ jobs: start_delay: 4000 - name: Commit GIF to the Repository - if: steps.check_changes.outputs.changed == 'true' + if: env.CHANGED == 'true' id: commit run: | git config --global user.name "${{ github.actor }}" git config --global user.email "${{ github.actor }}@users.noreply.github.com" git add . if git diff-index --quiet HEAD; then - echo "No changes to commit." - echo "::set-output name=changed_commit::false" + echo "CHANGED_COMMIT=false" >> $GITHUB_ENV else git commit -m 'Automatically generate GIF of the CV website' - echo "::set-output name=changed_commit::true" + echo "CHANGED_COMMIT=true" >> $GITHUB_ENV fi - name: Push changes - if: steps.commit.outputs.changed_commit == 'true' + if: env.CHANGED_COMMIT == 'true' run: git push