@@ -63,17 +63,13 @@ jobs:
6363          gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --draft --notes-from-tag dist/release/* 
6464         env :
6565          GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }} 
66-   docker-rootful  :
66+   docker :
6767    runs-on : ubuntu-latest 
6868    steps :
6969      - uses : actions/checkout@v4 
70-       #  fetch all commits instead of only the last as some branches are long lived and could have many between versions
71-       #  fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
72-       - run : git fetch --unshallow --quiet --tags --force 
73-       - uses : docker/setup-qemu-action@v3 
7470      - uses : docker/setup-buildx-action@v3 
7571      - uses : docker/metadata-action@v5 
76-         id : meta 
72+         id : meta-rootful  
7773        with :
7874          images : gitea/gitea 
7975          #  this will generate tags in the following format:
8682            type=semver,pattern={{major}} 
8783            type=semver,pattern={{major}}.{{minor}} 
8884            type=semver,pattern={{version}} 
89-        - name : Login to Docker Hub 
90-         uses : docker/login-action@v3 
91-         with :
92-           username : ${{ secrets.DOCKERHUB_USERNAME }} 
93-           password : ${{ secrets.DOCKERHUB_TOKEN }} 
94-       - name : build rootful docker image 
95-         uses : docker/build-push-action@v5 
96-         with :
97-           context : . 
98-           target : gitea 
99-           platforms : linux/amd64,linux/arm64 
100-           pull : true 
101-           push : true 
102-           tags : ${{ steps.meta.outputs.tags }} 
103-           labels : ${{ steps.meta.outputs.labels }} 
104-   docker-rootless :
105-     runs-on : ubuntu-latest 
106-     steps :
107-       - uses : actions/checkout@v4 
108-       #  fetch all commits instead of only the last as some branches are long lived and could have many between versions
109-       #  fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
110-       - run : git fetch --unshallow --quiet --tags --force 
111-       - uses : docker/setup-qemu-action@v3 
112-       - uses : docker/setup-buildx-action@v3 
11385       - uses : docker/metadata-action@v5 
114-         id : meta 
86+         id : meta-rootless  
11587        with :
11688          images : gitea/gitea 
11789          #  each tag below will have the suffix of -rootless
@@ -132,13 +104,29 @@ jobs:
132104        with :
133105          username : ${{ secrets.DOCKERHUB_USERNAME }} 
134106          password : ${{ secrets.DOCKERHUB_TOKEN }} 
107+       - name : build rootful docker image 
108+         uses : docker/build-push-action@v5 
109+         with :
110+           context : . 
111+           target : gitea 
112+           build-args :
113+             - GITHUB_REF_NAME=${{ env.GITHUB_REF_NAME }} 
114+             - GITHUB_REF_TYPE=${{ env.GITHUB_REF_TYPE }} 
115+           platforms : linux/amd64,linux/arm64 
116+           pull : true 
117+           push : true 
118+           tags : ${{ steps.meta-rootful.outputs.tags }} 
119+           labels : ${{ steps.meta-rootful.outputs.labels }} 
135120      - name : build rootless docker image 
136121        uses : docker/build-push-action@v5 
137122        with :
138123          context : . 
139124          target : gitea-rootless 
125+           build-args :
126+             - GITHUB_REF_NAME=${{ env.GITHUB_REF_NAME }} 
127+             - GITHUB_REF_TYPE=${{ env.GITHUB_REF_TYPE }} 
140128          platforms : linux/amd64,linux/arm64 
141129          pull : true 
142130          push : true 
143-           tags : ${{ steps.meta.outputs.tags }} 
144-           labels : ${{ steps.meta.outputs.labels }} 
131+           tags : ${{ steps.meta-rootless .outputs.tags }} 
132+           labels : ${{ steps.meta-rootless .outputs.labels }} 
0 commit comments