File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " Weekly Build (Wednesday)"
2+
3+ on :
4+ schedule :
5+ - cron : " 0 0 * * 3" # Runs weekly at 00:00 UTC on Wednesday
6+ workflow_dispatch :
7+
8+ permissions :
9+ packages : write
10+ contents : write
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v3
18+
19+ - name : Set up QEMU
20+ uses : docker/setup-qemu-action@v2
21+
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v2
24+
25+ - name : Login to GitHub Container Registry
26+ uses : docker/login-action@v2
27+ with :
28+ registry : ghcr.io
29+ username : ${{ github.actor }}
30+ password : ${{ secrets.GITHUB_TOKEN }}
31+
32+ - name : Generate date tag
33+ id : tag
34+ run : echo "DATE_TAG=$(date +'%Y%m%d')" >> $GITHUB_ENV
35+
36+ - name : Log Nightly Tag
37+ run : echo ${{ env.DATE_TAG }}
38+
39+ - name : Build and Push Docker Image
40+ uses : docker/build-push-action@v3
41+ with :
42+ context : .
43+ push : true
44+ platforms : linux/amd64
45+ tags : |
46+ ghcr.io/${{ github.repository_owner }}/beacon:community-nightly-${{ env.DATE_TAG }}
47+ ghcr.io/${{ github.repository_owner }}/beacon:community-nightly-latest
Original file line number Diff line number Diff line change 1- name : " Weekly Build (Wednesday) "
1+ name : " Release Build"
22
33on :
4- schedule :
5- - cron : " 0 0 * * 3" # Runs weekly at 00:00 UTC on Wednesday
4+ # Trigger ONLY when a tag is pushed (e.g., v1.2.3)
5+ push :
6+ tags :
7+ - " v*"
8+ # Optional: also allow manual trigger
69 workflow_dispatch :
7-
10+
811permissions :
9- packages : write
10- contents : write
11-
12+ packages : write
13+ contents : write
14+
1215jobs :
1316 build :
1417 runs-on : ubuntu-latest
@@ -29,12 +32,15 @@ jobs:
2932 username : ${{ github.actor }}
3033 password : ${{ secrets.GITHUB_TOKEN }}
3134
32- - name : Generate date tag
35+ - name : Extract tag name (version)
3336 id : tag
34- run : echo "DATE_TAG=$(date +'%Y%m%d')" >> $GITHUB_ENV
37+ run : |
38+ VERSION=${GITHUB_REF#refs/tags/}
39+ echo "VERSION_TAG=${VERSION}" >> $GITHUB_ENV
3540
36- - name : Log Nightly Tag
37- run : echo ${{ env.DATE_TAG }}
41+ - name : Log version tag
42+ run : |
43+ echo "Building release version: ${{ env.VERSION_TAG }}"
3844
3945 - name : Build and Push Docker Image
4046 uses : docker/build-push-action@v3
4349 push : true
4450 platforms : linux/amd64
4551 tags : |
46- ghcr.io/${{ github.repository_owner }}/beacon:community-nightly- ${{ env.DATE_TAG }}
47- ghcr.io/${{ github.repository_owner }}/beacon:community-nightly- latest
52+ ghcr.io/${{ github.repository_owner }}/beacon:community-${{ env.VERSION_TAG }}
53+ ghcr.io/${{ github.repository_owner }}/beacon:community-latest
Original file line number Diff line number Diff line change 1- # Beacon 1.2 .0
1+ # Beacon 1.3 .0
You can’t perform that action at this time.
0 commit comments