From d7eaae818a1ee76d355eb5b9d2d5d2479594216d Mon Sep 17 00:00:00 2001 From: wuyingjun Date: Tue, 19 Sep 2023 17:27:56 +0800 Subject: [PATCH] add release images stage Signed-off-by: wuyingjun --- .github/workflows/release_images.yml | 24 ++++++++++++++++++++++++ Makefile | 3 --- 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release_images.yml diff --git a/.github/workflows/release_images.yml b/.github/workflows/release_images.yml new file mode 100644 index 000000000..f4e52a41a --- /dev/null +++ b/.github/workflows/release_images.yml @@ -0,0 +1,24 @@ +name: Upload Images +on: + push: + tags: + - "v*.*.*" +jobs: + images: + runs-on: ubuntu-latest + permissions: write-all + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up qemu + uses: docker/setup-qemu-action@v2 + - name: Login registry + run: | + echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Push images + env: + ON_PLUGINS: true + run: | + make upload-images diff --git a/Makefile b/Makefile index 6728d2cc4..dfd1055e0 100644 --- a/Makefile +++ b/Makefile @@ -97,9 +97,6 @@ test: upload-images: images @echo "push images to $(REGISTRY)" -ifneq ($(REGISTRY_USER_NAME), "") - docker login -u ${REGISTRY_USER_NAME} -p ${REGISTRY_PASSWORD} ${REGISTRY_SERVER_ADDRESS} -endif docker push ${REGISTRY}/clusterlink-controller-manager:${VERSION} docker push ${REGISTRY}/clusterlink-operator:${VERSION} docker push ${REGISTRY}/clusterlink-agent:${VERSION}