@@ -14,6 +14,8 @@ concurrency:
1414jobs :
1515 binary :
1616 runs-on : namespace-profile-gitea-release-binary
17+ permissions :
18+ packages : write # to publish to ghcr.io
1719 steps :
1820 - uses : actions/checkout@v4
1921 # fetch all commits instead of only the last as some branches are long lived and could have many between versions
2527 check-latest : true
2628 - uses : actions/setup-node@v4
2729 with :
28- node-version : 22
30+ node-version : 24
2931 cache : npm
3032 cache-dependency-path : package-lock.json
3133 - run : make deps-frontend deps-backend
7173 GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }}
7274 docker-rootful :
7375 runs-on : namespace-profile-gitea-release-docker
76+ permissions :
77+ packages : write # to publish to ghcr.io
7478 steps :
7579 - uses : actions/checkout@v4
7680 # fetch all commits instead of only the last as some branches are long lived and could have many between versions
8185 - uses : docker/metadata-action@v5
8286 id : meta
8387 with :
84- images : gitea/gitea
88+ images : |-
89+ gitea/gitea
90+ ghcr.io/go-gitea/gitea
8591 # this will generate tags in the following format:
8692 # latest
8793 # 1
@@ -96,11 +102,17 @@ jobs:
96102 with :
97103 username : ${{ secrets.DOCKERHUB_USERNAME }}
98104 password : ${{ secrets.DOCKERHUB_TOKEN }}
105+ - name : Login to GHCR using PAT
106+ uses : docker/login-action@v3
107+ with :
108+ registry : ghcr.io
109+ username : ${{ github.repository_owner }}
110+ password : ${{ secrets.GITHUB_TOKEN }}
99111 - name : build rootful docker image
100112 uses : docker/build-push-action@v5
101113 with :
102114 context : .
103- platforms : linux/amd64,linux/arm64
115+ platforms : linux/amd64,linux/arm64,linux/riscv64
104116 push : true
105117 tags : ${{ steps.meta.outputs.tags }}
106118 labels : ${{ steps.meta.outputs.labels }}
@@ -116,7 +128,9 @@ jobs:
116128 - uses : docker/metadata-action@v5
117129 id : meta
118130 with :
119- images : gitea/gitea
131+ images : |-
132+ gitea/gitea
133+ ghcr.io/go-gitea/gitea
120134 # each tag below will have the suffix of -rootless
121135 flavor : |
122136 suffix=-rootless,onlatest=true
@@ -134,11 +148,17 @@ jobs:
134148 with :
135149 username : ${{ secrets.DOCKERHUB_USERNAME }}
136150 password : ${{ secrets.DOCKERHUB_TOKEN }}
151+ - name : Login to GHCR using PAT
152+ uses : docker/login-action@v3
153+ with :
154+ registry : ghcr.io
155+ username : ${{ github.repository_owner }}
156+ password : ${{ secrets.GITHUB_TOKEN }}
137157 - name : build rootless docker image
138158 uses : docker/build-push-action@v5
139159 with :
140160 context : .
141- platforms : linux/amd64,linux/arm64
161+ platforms : linux/amd64,linux/arm64,linux/riscv64
142162 push : true
143163 file : Dockerfile.rootless
144164 tags : ${{ steps.meta.outputs.tags }}
0 commit comments