mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	This PR will cross-publish the release, rc, and nightly images from `docker.io` to `ghcr.io` as docker hub has imposed rate-limiting Signed-off-by: Allen Conlon <software@conlon.dev>
This commit is contained in:
		
							
								
								
									
										24
									
								
								.github/workflows/release-nightly.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/release-nightly.yml
									
									
									
									
										vendored
									
									
								
							| @@ -59,6 +59,8 @@ jobs: | ||||
|           aws s3 sync dist/release s3://${{ secrets.AWS_S3_BUCKET }}/gitea/${{ steps.clean_name.outputs.branch }} --no-progress | ||||
|   nightly-docker-rootful: | ||||
|     runs-on: namespace-profile-gitea-release-docker | ||||
|     permissions: | ||||
|       packages: write # to publish to ghcr.io | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       # fetch all commits instead of only the last as some branches are long lived and could have many between versions | ||||
| @@ -85,6 +87,12 @@ jobs: | ||||
|         with: | ||||
|           username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||
|           password: ${{ secrets.DOCKERHUB_TOKEN }} | ||||
|       - name: Login to GHCR using PAT | ||||
|         uses: docker/login-action@v3 | ||||
|         with: | ||||
|           registry: ghcr.io | ||||
|           username: ${{ github.repository_owner }} | ||||
|           password: ${{ secrets.GITHUB_TOKEN }} | ||||
|       - name: fetch go modules | ||||
|         run: make vendor | ||||
|       - name: build rootful docker image | ||||
| @@ -93,9 +101,13 @@ jobs: | ||||
|           context: . | ||||
|           platforms: linux/amd64,linux/arm64 | ||||
|           push: true | ||||
|           tags: gitea/gitea:${{ steps.clean_name.outputs.branch }} | ||||
|           tags: |- | ||||
|             gitea/gitea:${{ steps.clean_name.outputs.branch }} | ||||
|             ghcr.io/go-gitea/gitea:${{ steps.clean_name.outputs.branch }} | ||||
|   nightly-docker-rootless: | ||||
|     runs-on: namespace-profile-gitea-release-docker | ||||
|     permissions: | ||||
|       packages: write # to publish to ghcr.io | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       # fetch all commits instead of only the last as some branches are long lived and could have many between versions | ||||
| @@ -122,6 +134,12 @@ jobs: | ||||
|         with: | ||||
|           username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||
|           password: ${{ secrets.DOCKERHUB_TOKEN }} | ||||
|       - name: Login to GHCR using PAT | ||||
|         uses: docker/login-action@v3 | ||||
|         with: | ||||
|           registry: ghcr.io | ||||
|           username: ${{ github.repository_owner }} | ||||
|           password: ${{ secrets.GITHUB_TOKEN }} | ||||
|       - name: fetch go modules | ||||
|         run: make vendor | ||||
|       - name: build rootless docker image | ||||
| @@ -131,4 +149,6 @@ jobs: | ||||
|           platforms: linux/amd64,linux/arm64 | ||||
|           push: true | ||||
|           file: Dockerfile.rootless | ||||
|           tags: gitea/gitea:${{ steps.clean_name.outputs.branch }}-rootless | ||||
|           tags: |- | ||||
|             gitea/gitea:${{ steps.clean_name.outputs.branch }}-rootless | ||||
|             ghcr.io/go-gitea/gitea:${{ steps.clean_name.outputs.branch }}-rootless | ||||
|   | ||||
							
								
								
									
										24
									
								
								.github/workflows/release-tag-rc.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/release-tag-rc.yml
									
									
									
									
										vendored
									
									
								
							| @@ -69,6 +69,8 @@ jobs: | ||||
|           GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||||
|   docker-rootful: | ||||
|     runs-on: namespace-profile-gitea-release-docker | ||||
|     permissions: | ||||
|       packages: write # to publish to ghcr.io | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       # fetch all commits instead of only the last as some branches are long lived and could have many between versions | ||||
| @@ -79,7 +81,9 @@ jobs: | ||||
|       - uses: docker/metadata-action@v5 | ||||
|         id: meta | ||||
|         with: | ||||
|           images: gitea/gitea | ||||
|           images: |- | ||||
|             gitea/gitea | ||||
|             ghcr.io/go-gitea/gitea | ||||
|           flavor: | | ||||
|             latest=false | ||||
|           # 1.2.3-rc0 | ||||
| @@ -90,6 +94,12 @@ jobs: | ||||
|         with: | ||||
|           username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||
|           password: ${{ secrets.DOCKERHUB_TOKEN }} | ||||
|       - name: Login to GHCR using PAT | ||||
|         uses: docker/login-action@v3 | ||||
|         with: | ||||
|           registry: ghcr.io | ||||
|           username: ${{ github.repository_owner }} | ||||
|           password: ${{ secrets.GITHUB_TOKEN }} | ||||
|       - name: build rootful docker image | ||||
|         uses: docker/build-push-action@v5 | ||||
|         with: | ||||
| @@ -100,6 +110,8 @@ jobs: | ||||
|           labels: ${{ steps.meta.outputs.labels }} | ||||
|   docker-rootless: | ||||
|     runs-on: namespace-profile-gitea-release-docker | ||||
|     permissions: | ||||
|       packages: write # to publish to ghcr.io | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       # fetch all commits instead of only the last as some branches are long lived and could have many between versions | ||||
| @@ -110,7 +122,9 @@ jobs: | ||||
|       - uses: docker/metadata-action@v5 | ||||
|         id: meta | ||||
|         with: | ||||
|           images: gitea/gitea | ||||
|           images: |- | ||||
|             gitea/gitea | ||||
|             ghcr.io/go-gitea/gitea | ||||
|           # each tag below will have the suffix of -rootless | ||||
|           flavor: | | ||||
|             latest=false | ||||
| @@ -123,6 +137,12 @@ jobs: | ||||
|         with: | ||||
|           username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||
|           password: ${{ secrets.DOCKERHUB_TOKEN }} | ||||
|       - name: Login to GHCR using PAT | ||||
|         uses: docker/login-action@v3 | ||||
|         with: | ||||
|           registry: ghcr.io | ||||
|           username: ${{ github.repository_owner }} | ||||
|           password: ${{ secrets.GITHUB_TOKEN }} | ||||
|       - name: build rootless docker image | ||||
|         uses: docker/build-push-action@v5 | ||||
|         with: | ||||
|   | ||||
							
								
								
									
										24
									
								
								.github/workflows/release-tag-version.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/release-tag-version.yml
									
									
									
									
										vendored
									
									
								
							| @@ -14,6 +14,8 @@ concurrency: | ||||
| jobs: | ||||
|   binary: | ||||
|     runs-on: namespace-profile-gitea-release-binary | ||||
|     permissions: | ||||
|       packages: write # to publish to ghcr.io | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       # fetch all commits instead of only the last as some branches are long lived and could have many between versions | ||||
| @@ -71,6 +73,8 @@ jobs: | ||||
|           GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||||
|   docker-rootful: | ||||
|     runs-on: namespace-profile-gitea-release-docker | ||||
|     permissions: | ||||
|       packages: write # to publish to ghcr.io | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       # fetch all commits instead of only the last as some branches are long lived and could have many between versions | ||||
| @@ -81,7 +85,9 @@ jobs: | ||||
|       - uses: docker/metadata-action@v5 | ||||
|         id: meta | ||||
|         with: | ||||
|           images: gitea/gitea | ||||
|           images: |- | ||||
|             gitea/gitea | ||||
|             ghcr.io/go-gitea/gitea | ||||
|           # this will generate tags in the following format: | ||||
|           # latest | ||||
|           # 1 | ||||
| @@ -96,6 +102,12 @@ jobs: | ||||
|         with: | ||||
|           username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||
|           password: ${{ secrets.DOCKERHUB_TOKEN }} | ||||
|       - name: Login to GHCR using PAT | ||||
|         uses: docker/login-action@v3 | ||||
|         with: | ||||
|           registry: ghcr.io | ||||
|           username: ${{ github.repository_owner }} | ||||
|           password: ${{ secrets.GITHUB_TOKEN }} | ||||
|       - name: build rootful docker image | ||||
|         uses: docker/build-push-action@v5 | ||||
|         with: | ||||
| @@ -116,7 +128,9 @@ jobs: | ||||
|       - uses: docker/metadata-action@v5 | ||||
|         id: meta | ||||
|         with: | ||||
|           images: gitea/gitea | ||||
|           images: |- | ||||
|             gitea/gitea | ||||
|             ghcr.io/go-gitea/gitea | ||||
|           # each tag below will have the suffix of -rootless | ||||
|           flavor: | | ||||
|             suffix=-rootless,onlatest=true | ||||
| @@ -134,6 +148,12 @@ jobs: | ||||
|         with: | ||||
|           username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||
|           password: ${{ secrets.DOCKERHUB_TOKEN }} | ||||
|       - name: Login to GHCR using PAT | ||||
|         uses: docker/login-action@v3 | ||||
|         with: | ||||
|           registry: ghcr.io | ||||
|           username: ${{ github.repository_owner }} | ||||
|           password: ${{ secrets.GITHUB_TOKEN }} | ||||
|       - name: build rootless docker image | ||||
|         uses: docker/build-push-action@v5 | ||||
|         with: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user