File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Check Tempo version
2+
3+ on :
4+ schedule :
5+ - cron : " 0 8 * * 1" # every Monday at 08:00 UTC
6+ workflow_dispatch :
7+
8+ env :
9+ TEMPO_REPO : tempoxyz/tempo
10+
11+ jobs :
12+ check :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : write
16+ pull-requests : write
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Get current and latest versions
21+ id : versions
22+ env :
23+ GH_TOKEN : ${{ github.token }}
24+ run : |
25+ current=$(grep '^DOCKER_IMAGE=' .envrc | sed 's/.*://')
26+ latest=$(gh api "repos/$TEMPO_REPO/releases/latest" --jq '.tag_name' | sed 's/^v//')
27+ echo "current=$current" >> "$GITHUB_OUTPUT"
28+ echo "latest=$latest" >> "$GITHUB_OUTPUT"
29+
30+ - name : Update and open PR
31+ if : steps.versions.outputs.current != steps.versions.outputs.latest
32+ env :
33+ GH_TOKEN : ${{ github.token }}
34+ run : |
35+ old="${{ steps.versions.outputs.current }}"
36+ new="${{ steps.versions.outputs.latest }}"
37+ branch="chore/bump-tempo-${new}"
38+
39+ sed -i "s/${old}/${new}/g" .envrc docker-compose.yaml
40+
41+ git checkout -b "$branch"
42+ git add .envrc docker-compose.yaml
43+ git commit -m "chore: bump tempo image to ${new}"
44+ git push -u origin "$branch"
45+ gh pr create \
46+ --title "chore: bump tempo image to ${new}" \
47+ --body "Bumps \`DOCKER_IMAGE\` from \`${old}\` to \`${new}\`." \
48+ --base main
You can’t perform that action at this time.
0 commit comments