66 - " [0-9]+.[0-9]+-dev[0-9]+"
77jobs :
88 main :
9- runs-on : ubuntu-22.04
9+ runs-on : large_runner
1010 permissions :
1111 contents : read
1212 packages : write
8484 ghcr.io/${{ github.repository }}:${{ env.BUILD_BRANCH }}
8585 ghcr.io/${{ github.repository }}:${{ env.BUILD_VER }}
8686 cache-from : type=local,src=/tmp/.buildx-cache
87- cache-to : type=local,dest=/tmp/.buildx-cache-new
87+ cache-to : type=local,dest=/tmp/.buildx-cache-new,mode=max
88+
89+ - name : Move cache
90+ if : ${{ env.BUILD_BRANCH == env.STABLE_BRANCH }}
91+ run : |
92+ rm -rf /tmp/.buildx-cache
93+ mv /tmp/.buildx-cache-new /tmp/.buildx-cache
94+
95+ - name : Build and push latest stable branch for s6
96+ if : ${{ env.BUILD_BRANCH == env.STABLE_BRANCH }}
97+ id : docker_build_latest_s6
98+ uses : docker/build-push-action@v6
99+ with :
100+ context : ${{ env.BUILD_BRANCH }}
101+ file : ${{ env.BUILD_BRANCH }}/Dockerfile.api
102+ builder : ${{ steps.buildx.outputs.name }}
103+ platforms : ${{ env.DOCKER_PLATFORMS }}
104+ push : true
105+ labels : |
106+ org.opencontainers.image.authors=${{ github.repository_owner }}
107+ org.opencontainers.image.created=${{ env.BUILD_DATE }}
108+ org.opencontainers.image.description=Created from commit ${{ env.GIT_SHA }} and ref ${{ env.GIT_REF }}
109+ org.opencontainers.image.ref.name=${{ env.GIT_REF }}
110+ org.opencontainers.image.revision=${{ github.sha }}
111+ org.opencontainers.image.source=https://github.com/${{ github.repository }}
112+ org.opencontainers.image.version=${{ env.BUILD_VER }}
113+ tags : |
114+ ${{ env.DOCKER_IMAGE }}:s6-latest
115+ ${{ env.DOCKER_IMAGE }}:s6-${{ env.BUILD_BRANCH }}
116+ ${{ env.DOCKER_IMAGE }}:s6-${{ env.BUILD_VER }}
117+ ghcr.io/${{ github.repository }}:s6-latest
118+ ghcr.io/${{ github.repository }}:s6-${{ env.BUILD_BRANCH }}
119+ ghcr.io/${{ github.repository }}:s6-${{ env.BUILD_VER }}
120+ cache-from : type=local,src=/tmp/.buildx-cache
121+ cache-to : type=local,dest=/tmp/.buildx-cache-new,mode=max
122+
123+ - name : Move cache for s6
124+ if : ${{ env.BUILD_BRANCH == env.STABLE_BRANCH }}
125+ run : |
126+ rm -rf /tmp/.buildx-cache
127+ mv /tmp/.buildx-cache-new /tmp/.buildx-cache
88128
89129 - name : Build and push everything else
90130 if : ${{ env.BUILD_BRANCH != env.STABLE_BRANCH }}
@@ -110,9 +150,42 @@ jobs:
110150 ghcr.io/${{ github.repository }}:${{ env.BUILD_BRANCH }}
111151 ghcr.io/${{ github.repository }}:${{ env.BUILD_VER }}
112152 cache-from : type=local,src=/tmp/.buildx-cache
113- cache-to : type=local,dest=/tmp/.buildx-cache-new
153+ cache-to : type=local,dest=/tmp/.buildx-cache-new,mode=max
114154
115155 - name : Move cache
156+ if : ${{ env.BUILD_BRANCH != env.STABLE_BRANCH }}
157+ run : |
158+ rm -rf /tmp/.buildx-cache
159+ mv /tmp/.buildx-cache-new /tmp/.buildx-cache
160+
161+ - name : Build and push everything else for s6
162+ if : ${{ env.BUILD_BRANCH != env.STABLE_BRANCH }}
163+ id : docker_build_regular_s6
164+ uses : docker/build-push-action@v6
165+ with :
166+ context : ${{ env.BUILD_BRANCH }}
167+ file : ${{ env.BUILD_BRANCH }}/Dockerfile.api
168+ builder : ${{ steps.buildx.outputs.name }}
169+ platforms : ${{ env.DOCKER_PLATFORMS }}
170+ push : true
171+ labels : |
172+ org.opencontainers.image.authors=${{ github.repository_owner }}
173+ org.opencontainers.image.created=${{ env.BUILD_DATE }}
174+ org.opencontainers.image.description=Created from commit ${{ env.GIT_SHA }} and ref ${{ env.GIT_REF }}
175+ org.opencontainers.image.ref.name=${{ env.GIT_REF }}
176+ org.opencontainers.image.revision=${{ github.sha }}
177+ org.opencontainers.image.source=https://github.com/${{ github.repository }}
178+ org.opencontainers.image.version=${{ env.BUILD_VER }}
179+ tags : |
180+ ${{ env.DOCKER_IMAGE }}:s6-${{ env.BUILD_BRANCH }}
181+ ${{ env.DOCKER_IMAGE }}:s6-${{ env.BUILD_VER }}
182+ ghcr.io/${{ github.repository }}:s6-${{ env.BUILD_BRANCH }}
183+ ghcr.io/${{ github.repository }}:s6-${{ env.BUILD_VER }}
184+ cache-from : type=local,src=/tmp/.buildx-cache
185+ cache-to : type=local,dest=/tmp/.buildx-cache-new,mode=max
186+
187+ - name : Move cache for s6
188+ if : ${{ env.BUILD_BRANCH != env.STABLE_BRANCH }}
116189 run : |
117190 rm -rf /tmp/.buildx-cache
118191 mv /tmp/.buildx-cache-new /tmp/.buildx-cache
0 commit comments