-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (73 loc) · 3.06 KB
/
track-containerd-releases.yml
File metadata and controls
94 lines (73 loc) · 3.06 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Track Containerd Releases
on:
schedule:
# Check for new releases daily at 11:00 UTC
- cron: '0 11 * * *'
workflow_dispatch:
permissions:
contents: read
issues: write
actions: write
jobs:
check-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Check for new containerd release
id: check
run: |
# Get latest stable release from containerd/containerd
LATEST=$(gh api repos/containerd/containerd/releases/latest --jq '.tag_name // empty')
if [ -z "$LATEST" ]; then
echo "ERROR: Failed to fetch latest containerd release"
exit 1
fi
echo "latest_release=$LATEST" >> $GITHUB_OUTPUT
# Containerd is bundled in Docker Engine builds, not released separately.
# Check if we already have an open or recent tracking issue for this version.
EXISTING=$(gh issue list \
--label "containerd-release" \
--state all \
--limit 50 \
--json number,title,state \
--jq ".[] | select(.title | contains(\"${LATEST}\")) | .number" \
| head -n1)
if [ -n "$EXISTING" ]; then
echo "already_tracked=true" >> $GITHUB_OUTPUT
echo "Containerd ${LATEST} already tracked in issue #${EXISTING}"
else
echo "already_tracked=false" >> $GITHUB_OUTPUT
fi
echo "Latest containerd release: $LATEST"
env:
GH_TOKEN: ${{ github.token }}
- name: Trigger Docker Engine rebuild with new containerd
if: steps.check.outputs.already_tracked == 'false'
env:
GH_TOKEN: ${{ github.token }}
run: |
LATEST=${{ steps.check.outputs.latest_release }}
echo "New containerd release detected: $LATEST"
echo "Triggering Docker Engine rebuild..."
# Trigger the Docker Engine build with the new containerd version
gh workflow run docker-weekly-build.yml -f containerd_ref=$LATEST
# Create tracking issue
cat > issue-body.md << EOF
New containerd release detected: **$LATEST**
**Status:** Docker Engine rebuild automatically triggered with containerd_ref=$LATEST
Containerd is built as part of the Docker Engine build and bundled in the release.
The docker-weekly-build workflow has been started automatically.
**Monitor build progress:**
\`\`\`bash
gh run list --workflow=docker-weekly-build.yml --limit 1
gh run watch
\`\`\`
**Upstream release notes:** https://github.com/containerd/containerd/releases/tag/$LATEST
This issue will be closed automatically when the Docker Engine build completes.
EOF
gh issue create \
--title "Building containerd ${LATEST} for Docker Engine RISC-V64" \
--body-file issue-body.md \
--label "build-in-progress,containerd-release"
echo "Build triggered successfully!"