Merge pull request #90 from indrastorms/dev #22
This file contains hidden or 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: Update Bundle | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| version: | ||
| description: 'Version to use' | ||
| required: true | ||
| default: null | ||
| jobs: | ||
| update-bundle: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| fetch-depth: 0 | ||
| - name: Update Bundle | ||
| run: | | ||
| version=${{ inputs.version }} | ||
| patches_asset_url="https://github.com/indrastorms/Dropped-Patches/releases/latest/download/dropped-patches-${version}.rvp" | ||
| info_dict=$(cat <<EOF | ||
| { | ||
| "patches": { | ||
| "version": "${version}", | ||
| "url": "${patches_asset_url}" | ||
| } | ||
| } | ||
| EOF | ||
| ) | ||
| echo "bundle_file=dropped-patches-bundle.json" >> $GITHUB_ENV | ||
| echo "$info_dict" > "${{ env.bundle_file }}" | ||
| echo "Latest release information saved to ${{ env.bundle_file }}" | ||
| - name: Commit changes | ||
| run: | | ||
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git config --local user.name "github-actions[bot]" | ||
| git add ${{ env.bundle_file }} | ||
| git commit -m "update ${{ env.bundle_file }} [skip ci]" | ||
| git pull | ||
| - name: Push changes | ||
| uses: ad-m/github-push-action@master | ||
| with: | ||
| github_token: ${{ secrets.GIT_TOKEN }} | ||
| branch: main | ||