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}