From b718e922c81f2554b120a43413a5108d64423c66 Mon Sep 17 00:00:00 2001 From: Sebastian Nickel Date: Wed, 27 Nov 2024 12:30:33 +0100 Subject: [PATCH] build and publish tailscale client, k8s-operator and k8s-nameserver images --- .../workflows/build-and-publish-images.yml | 45 +++++++++++++++++++ .github/workflows/publish-operator.yml | 31 ------------- 2 files changed, 45 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/build-and-publish-images.yml delete mode 100644 .github/workflows/publish-operator.yml diff --git a/.github/workflows/build-and-publish-images.yml b/.github/workflows/build-and-publish-images.yml new file mode 100644 index 0000000000000..ce11455c080a8 --- /dev/null +++ b/.github/workflows/build-and-publish-images.yml @@ -0,0 +1,45 @@ +name: Publish Dev Operator + +on: + push: + tags: + - 'v*.*.*' + - 'v*.*.*-*' +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and publish k8s-operator image + env: + REPO: ghcr.io/${{ github.repository_owner }}/tailscale-k8s-operator + TAGS: ${{ github.ref_name }} + run: | + echo "Building and publishing k8s-operator to ${REPO} with tags ${TAGS}" + TAGS="${TAGS}" REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=operator ./build_docker.sh + - name: Build and publish nameserver image + env: + REPO: ghcr.io/${{ github.repository_owner }}/tailscale-k8s-nameserver + TAGS: ${{ github.ref_name }} + run: | + echo "Building and publishing k8s-nameserver to ${REPO} with tags ${TAGS}" + TAGS="${TAGS}" REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=k8s-nameserver ./build_docker.sh + - name: Build and publish client image + env: + REPO: ghcr.io/${{ github.repository_owner }}/tailscale + TAGS: ${{ github.ref_name }} + run: | + echo "Building and publishing tailscale client to ${REPO} with tags ${TAGS}" + TAGS="${TAGS}" REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=client ./build_docker.sh diff --git a/.github/workflows/publish-operator.yml b/.github/workflows/publish-operator.yml deleted file mode 100644 index 35a58c0f492d8..0000000000000 --- a/.github/workflows/publish-operator.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Publish Dev Operator - -on: - push: - tags: - - 'v*.*.*' - - 'v*.*.*-*' -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and publish k8s-operator image - env: - REPO: ghcr.io/${{ github.repository_owner }}/tailscale - TAGS: ${{ github.ref_name }} - run: | - echo "Building and publishing to ${REPO} with tags ${TAGS}" - make publishdevoperator