Skip to content

Commit 8776623

Browse files
feat(ci): switch to build_docker.sh (#7)
1 parent 2f0c16c commit 8776623

File tree

3 files changed

+21
-35
lines changed

3 files changed

+21
-35
lines changed

.github/workflows/publish-chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: echo "VERSION=$(cat VERSION.txt)" >> $GITHUB_ENV
3535

3636
- name: Set HELM_VERSION
37-
run: echo "HELM_VERSION=${{ env.VERSION }}-${GITHUB_SHA::7}" >> $GITHUB_ENV
37+
run: echo "HELM_VERSION=v${{ env.VERSION }}-${GITHUB_SHA::7}" >> $GITHUB_ENV
3838

3939
- name: Login to GitHub Container Registry
4040
uses: docker/login-action@v3

.github/workflows/publish-image.yaml

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,14 @@ jobs:
3333
id: set_version
3434
run: echo "VERSION=$(cat VERSION.txt)" >> $GITHUB_ENV
3535

36-
- name: Docker meta
37-
id: meta
38-
uses: docker/metadata-action@v5
39-
with:
40-
images: ghcr.io/${{ github.repository }}
41-
labels: |
42-
org.opencontainers.image.source="https://github.com/coreweave/tailscale"
43-
tags: |
44-
type=ref,event=branch
45-
type=ref,event=pr
46-
type=schedule
47-
type=raw,value=latest,enable={{is_default_branch}}
48-
type=raw,value=${{ env.VERSION }}
49-
type=raw,value=${{ env.VERSION }}-{{sha}}
36+
- name: Set image tag
37+
run: echo "TAGS=v${{ env.VERSION }}-${GITHUB_SHA::7}" >> $GITHUB_ENV
5038

51-
- name: Set up QEMU
52-
uses: docker/setup-qemu-action@v3.2.0
39+
- name: Set PUSH
40+
run: echo "PUSH=true" >> $GITHUB_ENV
5341

54-
- name: Set up Docker Buildx
55-
uses: docker/setup-buildx-action@v3.6.1
42+
- name: Set PLATFORM
43+
run: echo "PLATFORM=flyio" >> $GITHUB_ENV
5644

5745
- name: Log into registry ghcr.io
5846
uses: docker/login-action@v3.3.0
@@ -61,17 +49,17 @@ jobs:
6149
username: ${{ github.actor }}
6250
password: ${{ secrets.GITHUB_TOKEN }}
6351

64-
- name: Build and push Docker image
65-
id: build-and-push
66-
uses: docker/build-push-action@v6.6.0
67-
with:
68-
push: ${{ github.event_name != 'pull_request' }}
69-
cache-from: type=gha
70-
cache-to: type=gha,mode=max
71-
context: ./
72-
file: ./Dockerfile
73-
labels: ${{ steps.meta.outputs.labels }}
74-
platforms: linux/amd64,linux/arm64
75-
build-args: |
76-
VERSION=${{ env.VERSION }}
77-
tags: ${{ steps.meta.outputs.tags }}
52+
- name: Publish client
53+
shell: bash
54+
run: |
55+
REPOS="ghcr.io/${{ github.repository }}/tailscale" TARGET="client" ./build_docker.sh
56+
57+
- name: Publish k8s-operator
58+
shell: bash
59+
run: |
60+
REPOS="ghcr.io/${{ github.repository }}/k8s-operator" TARGET="operator" ./build_docker.sh
61+
62+
- name: Publish k8s-nameserver
63+
shell: bash
64+
run: |
65+
REPOS="ghcr.io/${{ github.repository }}/k8s-nameserver" TARGET="k8s-nameserver" ./build_docker.sh

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,3 @@ COPY --from=build-env /go/bin/* /usr/local/bin/
7373
# For compat with the previous run.sh, although ideally you should be
7474
# using build_docker.sh which sets an entrypoint for the image.
7575
RUN mkdir /tailscale && ln -s /usr/local/bin/containerboot /tailscale/run.sh
76-
77-
CMD "/usr/local/bin/containerboot"

0 commit comments

Comments
 (0)