0725f5c5cf
Bumps [mikefarah/yq](https://github.com/mikefarah/yq) from 4.40.7 to 4.43.1.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](bb66c9c872...c35ec752e3
)
---
updated-dependencies:
- dependency-name: mikefarah/yq
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
73 lines
3 KiB
YAML
73 lines
3 KiB
YAML
name: Update AppVeyor Image
|
|
|
|
# Run chron daily Mon-Fri
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 8 * * 1-5' # runs 8:00 every business day (see https://crontab.guru)
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
bake-appveyor-image:
|
|
name: Bake AppVeyor Image
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Generate GitHub App token
|
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
|
id: generate-token
|
|
with:
|
|
creds: ${{ secrets.APPVEYOR_UPDATER_GH_APP_CREDS }}
|
|
- name: Checkout
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ steps.generate-token.outputs.token }}
|
|
- name: Yarn install
|
|
run: |
|
|
node script/yarn.js install --frozen-lockfile
|
|
- name: Set Repo for Commit
|
|
run: git config --global --add safe.directory $GITHUB_WORKSPACE
|
|
- name: Check AppVeyor Image
|
|
env:
|
|
APPVEYOR_TOKEN: ${{ secrets.APPVEYOR_TOKEN }}
|
|
run: |
|
|
node ./script/prepare-appveyor
|
|
if [ -f ./image_version.txt ]; then
|
|
echo "APPVEYOR_IMAGE_VERSION="$(cat image_version.txt)"" >> $GITHUB_ENV
|
|
rm image_version.txt
|
|
fi
|
|
- name: (Optionally) Update Appveyor Image
|
|
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
|
uses: mikefarah/yq@c35ec752e38ea0c096d3c44e13cfc0797ac394d8 # v4.43.1
|
|
with:
|
|
cmd: |
|
|
yq '.image = "${{ env.APPVEYOR_IMAGE_VERSION }}"' "appveyor.yml" > "appveyor2.yml"
|
|
yq '.image = "${{ env.APPVEYOR_IMAGE_VERSION }}"' "appveyor-woa.yml" > "appveyor-woa2.yml"
|
|
- name: (Optionally) Generate Commit Diff
|
|
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
|
run: |
|
|
diff -w -B appveyor.yml appveyor2.yml > appveyor.diff || true
|
|
patch -f appveyor.yml < appveyor.diff
|
|
rm appveyor2.yml appveyor.diff
|
|
git add appveyor.yml
|
|
- name: (Optionally) Generate Commit Diff for WOA
|
|
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
|
run: |
|
|
diff -w -B appveyor-woa.yml appveyor-woa2.yml > appveyor-woa.diff || true
|
|
patch -f appveyor-woa.yml < appveyor-woa.diff
|
|
rm appveyor-woa2.yml appveyor-woa.diff
|
|
git add appveyor-woa.yml
|
|
- name: (Optionally) Commit to Branch
|
|
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
|
uses: dsanders11/github-app-commit-action@1dd0a2d22c564461d3f598b6858856e8842d7a16 # v1.1.0
|
|
with:
|
|
message: 'build: update appveyor image to latest version'
|
|
ref: bump-appveyor-image
|
|
token: ${{ steps.generate-token.outputs.token }}
|
|
- name: (Optionally) Create Pull Request
|
|
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
|
run: |
|
|
printf "This PR updates appveyor.yml to the latest baked image, ${{ env.APPVEYOR_IMAGE_VERSION }}.\n\nNotes: none" | gh pr create --head bump-appveyor-image --label no-backport --label semver/none --title 'build: update appveyor image to latest version' --body-file=-
|
|
env:
|
|
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|