File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,4 +15,4 @@ strip_html_comments = true # default: false
1515always = true # default: false
1616
1717[approve ]
18- auto_approve_usernames = [" 1gtm" , " tamalsaha " ]
18+ auto_approve_usernames = [" tamalsaha " , " 1gtm" , " 1gtm-app[bot] " ]
Original file line number Diff line number Diff line change @@ -10,25 +10,31 @@ jobs:
1010 runs-on : ubuntu-24.04
1111
1212 steps :
13- - uses : actions/checkout@v1
13+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
14+ with :
15+ fetch-depth : 0
16+
17+ - name : Generate LGTM App token
18+ id : lgtm-app-token
19+ uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
20+ with :
21+ client-id : ${{ secrets.LGTM_APP_CLIENT_ID }}
22+ private-key : ${{ secrets.LGTM_APP_PRIVATE_KEY }}
23+ owner : ${{ github.repository_owner }}
24+ permission-contents : write
25+ permission-pull-requests : write
1426
1527 - name : Prepare git
1628 env :
1729 GITHUB_USER : 1gtm
18- GITHUB_TOKEN : ${{ secrets.LGTM_GITHUB_TOKEN }}
30+ GITHUB_TOKEN : ${{ steps.lgtm-app-token.outputs.token }}
1931 run : |
2032 git config --global user.name "${GITHUB_USER}"
2133 git config --global user.email "${GITHUB_USER}@appscode.com"
22- git remote set-url origin https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
23-
24- - name : Install GitHub CLI
25- run : |
26- curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
27- sudo mv bin/hub /usr/local/bin
34+ git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
2835
2936 - name : Update release branches
3037 env :
31- GITHUB_USER : 1gtm
32- GITHUB_TOKEN : ${{ secrets.LGTM_GITHUB_TOKEN }}
38+ GITHUB_TOKEN : ${{ steps.lgtm-app-token.outputs.token }}
3339 run : |
3440 ./hack/scripts/cherry-pick.sh
Original file line number Diff line number Diff line change @@ -14,36 +14,38 @@ jobs:
1414 runs-on : ubuntu-24.04
1515 steps :
1616 - name : Set up Go 1.25
17- uses : actions/setup-go@v5
17+ uses : actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
1818 with :
1919 go-version : ' 1.25'
2020 id : go
2121
22- - uses : actions/checkout@v1
22+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2323
2424 - name : Set up QEMU
2525 id : qemu
26- uses : docker/setup-qemu-action@v3
26+ uses : docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
2727 with :
2828 cache-image : false
2929
3030 - name : Set up Docker Buildx
31- uses : docker/setup-buildx-action@v1
31+ uses : docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
3232
3333 - name : Prepare Host
3434 run : |
35- sudo apt-get -qq update || true
36- sudo apt-get install -y bzr
3735
3836 - name : Run checks
3937 run : |
4038 make ci
4139
40+ - name : Login to GitHub Container Registry
41+ uses : docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
42+ with :
43+ registry : ghcr.io
44+ username : 1gtm
45+ password : ${{ secrets.LGTM_GITHUB_TOKEN }}
46+
4247 - name : Build
4348 env :
4449 REGISTRY : ghcr.io/appscodeci
45- DOCKER_TOKEN : ${{ secrets.LGTM_GITHUB_TOKEN }}
46- USERNAME : 1gtm
4750 run : |
48- docker login ghcr.io --username ${USERNAME} --password ${DOCKER_TOKEN}
4951 make push
Original file line number Diff line number Diff line change 66
77jobs :
88 build :
9+ if : github.event.pull_request.merged == true
910 runs-on : ubuntu-24.04
1011
1112 steps :
12- - uses : actions/checkout@v1
13+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1314
14- - name : Prepare git
15- env :
16- GITHUB_USER : 1gtm
17- GITHUB_TOKEN : ${{ secrets.LGTM_GITHUB_TOKEN }}
18- run : |
19- git config --global user.name "${GITHUB_USER}"
20- git config --global user.email "${GITHUB_USER}@appscode.com"
21- git remote set-url origin https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
22-
23- - name : Install GitHub CLI
24- run : |
25- curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
26- sudo mv bin/hub /usr/local/bin
15+ - name : Generate LGTM App token
16+ id : lgtm-app-token
17+ uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
18+ with :
19+ client-id : ${{ secrets.LGTM_APP_CLIENT_ID }}
20+ private-key : ${{ secrets.LGTM_APP_PRIVATE_KEY }}
21+ owner : ${{ github.repository_owner }}
22+ repositories : CHANGELOG
23+ permission-pull-requests : write
2724
2825 - name : Update release tracker
29- if : |
30- github.event.action == 'closed' &&
31- github.event.pull_request.merged == true
3226 env :
33- GITHUB_USER : 1gtm
34- GITHUB_TOKEN : ${{ secrets.LGTM_GITHUB_TOKEN }}
27+ GITHUB_USER : ${{ github.actor }}
28+ GITHUB_TOKEN : ${{ steps.lgtm-app-token.outputs.token }}
3529 run : |
3630 ./hack/scripts/update-release-tracker.sh
Original file line number Diff line number Diff line change 99 build :
1010 name : Build
1111 runs-on : ubuntu-24.04
12+ permissions :
13+ contents : write
14+ packages : write
1215 steps :
1316 - name : Check out code into the Go module directory
14- uses : actions/checkout@v1
15-
16- - name : Install GitHub CLI
17- run : |
18- curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
19- sudo mv bin/hub /usr/local/bin
17+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
18+ with :
19+ fetch-depth : 0
2020
2121 - name : Print version info
2222 id : semver
@@ -25,19 +25,23 @@ jobs:
2525
2626 - name : Set up QEMU
2727 id : qemu
28- uses : docker/setup-qemu-action@v3
28+ uses : docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
2929 with :
3030 cache-image : false
3131
3232 - name : Set up Docker Buildx
33- uses : docker/setup-buildx-action@v1
33+ uses : docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
34+
35+ - name : Log in to the GitHub Container registry
36+ uses : docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
37+ with :
38+ registry : ghcr.io
39+ username : 1gtm
40+ password : ${{ secrets.LGTM_GITHUB_TOKEN }}
3441
3542 - name : Publish to GitHub Container Registry
3643 env :
3744 REGISTRY : ghcr.io/stashed
38- DOCKER_TOKEN : ${{ secrets.LGTM_GITHUB_TOKEN }}
39- USERNAME : 1gtm
4045 APPSCODE_ENV : prod
4146 run : |
42- docker login ghcr.io --username ${USERNAME} --password ${DOCKER_TOKEN}
4347 make release
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ REGISTRY ?= stashed
2525
2626# This version-strategy uses git tags to set the version string
2727git_branch := $(shell git rev-parse --abbrev-ref HEAD)
28- git_tag := $(shell git describe --exact-match --abbrev=0 2>/dev/null || echo "")
28+ git_tag := $(shell git describe --tags -- exact-match --abbrev=0 2>/dev/null || echo "")
2929commit_hash := $(shell git rev-parse --verify HEAD)
3030commit_timestamp := $(shell date --date="@$$(git show -s --format=%ct ) " --utc +% FT% T)
3131
Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ while IFS=/ read -r -u9 repo branch; do
3737 git checkout -b $pr_branch
3838 git cherry-pick --strategy=recursive -X theirs $GITHUB_SHA
3939 git push -u origin HEAD -f
40- hub pull-request \
40+ gh pr create \
4141 --base $branch \
42- --labels automerge \
43- --message " [cherry-pick] $( git show -s --format=%s) " \
44- --message " $( git show -s --format=%b | sed --expression=' /\/cherry-pick/d' ) " || true
42+ --label automerge \
43+ --title " [cherry-pick] $( git show -s --format=%s) " \
44+ --body " $( git show -s --format=%b | sed --expression=' /\/cherry-pick/d' ) " || true
4545 sleep 15
4646done 9< <( git branch -r | grep release)
Original file line number Diff line number Diff line change @@ -69,4 +69,4 @@ case $GITHUB_BASE_REF in
6969 ;;
7070esac
7171
72- hub api " $api_url " -f body=" $msg "
72+ gh api " $api_url " -f body=" $msg "
You can’t perform that action at this time.
0 commit comments