5656 - name : upload binaries to s3
5757 run : |
5858 aws s3 sync dist/release s3://${{ secrets.AWS_S3_BUCKET }}/gitea/${{ steps.clean_name.outputs.branch }} --no-progress
59- nightly-docker-rootful :
59+ nightly-container :
6060 runs-on : namespace-profile-gitea-release-docker
6161 permissions :
6262 packages : write # to publish to ghcr.io
@@ -65,17 +65,36 @@ jobs:
6565 # fetch all commits instead of only the last as some branches are long lived and could have many between versions
6666 # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
6767 - run : git fetch --unshallow --quiet --tags --force
68- - uses : actions/setup-go@v6
69- with :
70- go-version-file : go.mod
71- check-latest : true
7268 - uses : docker/setup-qemu-action@v3
7369 - uses : docker/setup-buildx-action@v3
7470 - name : Get cleaned branch name
7571 id : clean_name
7672 run : |
7773 REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
7874 echo "branch=${REF_NAME}-nightly" >> "$GITHUB_OUTPUT"
75+ - uses : docker/metadata-action@v5
76+ id : meta
77+ with :
78+ images : |-
79+ gitea/gitea
80+ ghcr.io/go-gitea/gitea
81+ tags : |
82+ type=raw,value=${{ steps.clean_name.outputs.branch }}
83+ annotations : |
84+ org.opencontainers.image.authors="maintainers@gitea.io"
85+ - uses : docker/metadata-action@v5
86+ id : meta_rootless
87+ with :
88+ images : |-
89+ gitea/gitea
90+ ghcr.io/go-gitea/gitea
91+ # each tag below will have the suffix of -rootless
92+ flavor : |
93+ suffix=-rootless
94+ tags : |
95+ type=raw,value=${{ steps.clean_name.outputs.branch }}
96+ annotations : |
97+ org.opencontainers.image.authors="maintainers@gitea.io"
7998 - name : Login to Docker Hub
8099 uses : docker/login-action@v3
81100 with :
@@ -87,57 +106,20 @@ jobs:
87106 registry : ghcr.io
88107 username : ${{ github.repository_owner }}
89108 password : ${{ secrets.GITHUB_TOKEN }}
90- - name : fetch go modules
91- run : make vendor
92- - name : build rootful docker image
109+ - name : build regular docker image
93110 uses : docker/build-push-action@v5
94111 with :
95112 context : .
96113 platforms : linux/amd64,linux/arm64,linux/riscv64
97114 push : true
98- tags : |-
99- gitea/gitea:${{ steps.clean_name.outputs.branch }}
100- ghcr.io/go-gitea/gitea:${{ steps.clean_name.outputs.branch }}
101- nightly-docker-rootless :
102- runs-on : namespace-profile-gitea-release-docker
103- permissions :
104- packages : write # to publish to ghcr.io
105- steps :
106- - uses : actions/checkout@v5
107- # fetch all commits instead of only the last as some branches are long lived and could have many between versions
108- # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
109- - run : git fetch --unshallow --quiet --tags --force
110- - uses : actions/setup-go@v6
111- with :
112- go-version-file : go.mod
113- check-latest : true
114- - uses : docker/setup-qemu-action@v3
115- - uses : docker/setup-buildx-action@v3
116- - name : Get cleaned branch name
117- id : clean_name
118- run : |
119- REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
120- echo "branch=${REF_NAME}-nightly" >> "$GITHUB_OUTPUT"
121- - name : Login to Docker Hub
122- uses : docker/login-action@v3
123- with :
124- username : ${{ secrets.DOCKERHUB_USERNAME }}
125- password : ${{ secrets.DOCKERHUB_TOKEN }}
126- - name : Login to GHCR using PAT
127- uses : docker/login-action@v3
128- with :
129- registry : ghcr.io
130- username : ${{ github.repository_owner }}
131- password : ${{ secrets.GITHUB_TOKEN }}
132- - name : fetch go modules
133- run : make vendor
115+ tags : ${{ steps.meta.outputs.tags }}
116+ annotations : ${{ steps.meta.outputs.annotations }}
134117 - name : build rootless docker image
135118 uses : docker/build-push-action@v5
136119 with :
137120 context : .
138- platforms : linux/amd64,linux/arm64
121+ platforms : linux/amd64,linux/arm64,linux/riscv64
139122 push : true
140123 file : Dockerfile.rootless
141- tags : |-
142- gitea/gitea:${{ steps.clean_name.outputs.branch }}-rootless
143- ghcr.io/go-gitea/gitea:${{ steps.clean_name.outputs.branch }}-rootless
124+ tags : ${{ steps.meta_rootless.outputs.tags }}
125+ annotations : ${{ steps.meta_rootless.outputs.annotations }}
0 commit comments