diff --git a/.github/workflows/publish-chart.yaml b/.github/workflows/publish-chart.yaml index ee833da65381a..3790f87733589 100644 --- a/.github/workflows/publish-chart.yaml +++ b/.github/workflows/publish-chart.yaml @@ -34,7 +34,7 @@ jobs: run: echo "VERSION=$(cat VERSION.txt)" >> $GITHUB_ENV - name: Set HELM_VERSION - run: echo "HELM_VERSION=${{ env.VERSION }}-${GITHUB_SHA::7}" >> $GITHUB_ENV + run: echo "HELM_VERSION=v${{ env.VERSION }}-${GITHUB_SHA::7}" >> $GITHUB_ENV - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/publish-image.yaml b/.github/workflows/publish-image.yaml index 6520b5a6a9a1d..d34954cf8f57e 100644 --- a/.github/workflows/publish-image.yaml +++ b/.github/workflows/publish-image.yaml @@ -33,26 +33,14 @@ jobs: id: set_version run: echo "VERSION=$(cat VERSION.txt)" >> $GITHUB_ENV - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository }} - labels: | - org.opencontainers.image.source="https://github.com/coreweave/tailscale" - tags: | - type=ref,event=branch - type=ref,event=pr - type=schedule - type=raw,value=latest,enable={{is_default_branch}} - type=raw,value=${{ env.VERSION }} - type=raw,value=${{ env.VERSION }}-{{sha}} + - name: Set image tag + run: echo "TAGS=v${{ env.VERSION }}-${GITHUB_SHA::7}" >> $GITHUB_ENV - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.2.0 + - name: Set PUSH + run: echo "PUSH=true" >> $GITHUB_ENV - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.6.1 + - name: Set PLATFORM + run: echo "PLATFORM=flyio" >> $GITHUB_ENV - name: Log into registry ghcr.io uses: docker/login-action@v3.3.0 @@ -61,17 +49,17 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@v6.6.0 - with: - push: ${{ github.event_name != 'pull_request' }} - cache-from: type=gha - cache-to: type=gha,mode=max - context: ./ - file: ./Dockerfile - labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 - build-args: | - VERSION=${{ env.VERSION }} - tags: ${{ steps.meta.outputs.tags }} + - name: Publish client + shell: bash + run: | + REPOS="ghcr.io/${{ github.repository }}/tailscale" TARGET="client" ./build_docker.sh + + - name: Publish k8s-operator + shell: bash + run: | + REPOS="ghcr.io/${{ github.repository }}/k8s-operator" TARGET="operator" ./build_docker.sh + + - name: Publish k8s-nameserver + shell: bash + run: | + REPOS="ghcr.io/${{ github.repository }}/k8s-nameserver" TARGET="k8s-nameserver" ./build_docker.sh diff --git a/Dockerfile b/Dockerfile index c2ef0d9d5684d..8534563f6cf57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,5 +73,3 @@ COPY --from=build-env /go/bin/* /usr/local/bin/ # For compat with the previous run.sh, although ideally you should be # using build_docker.sh which sets an entrypoint for the image. RUN mkdir /tailscale && ln -s /usr/local/bin/containerboot /tailscale/run.sh - -CMD "/usr/local/bin/containerboot"