-
Notifications
You must be signed in to change notification settings - Fork 68
67 lines (59 loc) · 2.85 KB
/
version-checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Version Checks
on:
schedule:
- cron: '42 23 * * *'
workflow_dispatch:
jobs:
check-and-trigger:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/[email protected]
with:
repository: 'buanet/ioBroker.docker'
token: ${{ secrets.ACTIONS_PAT }}
- name: Docker Baseimage Checker
id: baseimage
uses: mkumatag/[email protected]
with:
image: 'buanet/iobroker:latest'
base-image: 'debian:bookworm-slim'
- name: Fetch ioBroker and nodejs 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)"
curl -sL https://nodejs.org/dist/index.json | \
jq -r 'map(select(.version | startswith("v18."))) | .[0].version' > .github/dependencies/.nodejs-version
echo "[LOG] Fetched nodejs version is $(cat .github/dependencies/.nodejs-version)"
- name: Check for modified files
id: git-check
run: echo "modified=$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")" >> $GITHUB_OUTPUT
- 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: Logging result
run: |
echo "base image updated = ${{ steps.baseimage.outputs.needs-update }}"
echo "ioBroker version updated = ${{ steps.git-check.outputs.modified }}"
- name: Trigger Build Debian 12 Image (latest)
if: steps.baseimage.outputs.needs-update == 'true' || steps.git-check.outputs.modified == 'true'
uses: benc-uk/[email protected]
with:
ref: 'main'
workflow: 'Build Debian 12 Image (latest)'
repo: 'buanet/iobroker.docker'
token: ${{ secrets.ACTIONS_PAT }}