Version Checks #371
This file contains 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: Check ioBroker versions | |
on: | |
schedule: | |
- cron: '42 23 * * *' | |
workflow_dispatch: | |
jobs: | |
check-and-trigger: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
repository: 'buanet/ioBroker.raspberry-os' | |
- name: Fetch ioBroker versions | |
run: | | |
curl -sL https://repo.iobroker.live/sources-dist.json | \ | |
jq -r '."js-controller".version' > .github/dependencies/.js-controller-version | |
echo "[LOG] Fetched js-controller version is $(cat .github/dependencies/.js-controller-version)" | |
curl -sL https://repo.iobroker.live/sources-dist.json | \ | |
jq -r '."admin".version' > .github/dependencies/.admin-version | |
echo "[LOG] Fetched admin version is $(cat .github/dependencies/.admin-version)" | |
curl -sL https://repo.iobroker.live/sources-dist.json | \ | |
jq -r '."backitup".version' > .github/dependencies/.backitup-version | |
echo "[LOG] Fetched backitup version is $(cat .github/dependencies/.backitup-version)" | |
curl -sL https://repo.iobroker.live/sources-dist.json | \ | |
jq -r '."discovery".version' > .github/dependencies/.discovery-version | |
echo "[LOG] Fetched discovery version is $(cat .github/dependencies/.discovery-version)" | |
- name: Check for modified files | |
id: git-check | |
run: echo "modified=$([ -z \"`git status --porcelain`\" ] && echo \"false\" || echo \"true\")" >> $GITHUB_ENV | |
- name: Commit latest release version | |
if: steps.git-check.outputs.modified == 'true' | |
run: | | |
git config --global user.name 'buanet' | |
git config --global user.email '[email protected]' | |
git commit -am "new ioBroker versions" | |
git push | |
- name: Trigger image build | |
if: steps.git-check.outputs.modified == 'true' | |
uses: benc-uk/[email protected] | |
with: | |
workflow: Build image | |
repo: buanet/ioBroker.raspberry-os | |
token: ${{ secrets.ACTIONS_PAT }} | |