From 7afcc3c43dae5875aad5dae4bbd2c73f4d42e074 Mon Sep 17 00:00:00 2001 From: Srikar Tati Date: Mon, 9 Nov 2020 13:33:11 -0800 Subject: [PATCH] Fix docker image build --- .github/workflows/build.yml | 11 +++++------ .github/workflows/build_tag.yml | 7 +++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4f668f5..4fefcdeb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,14 +18,13 @@ jobs: - uses: actions/checkout@v2 - name: Build ipfix-collector Docker image run: | - make collector - make docker-collector + make collector + make docker-collector - name: Push ipfix-collector Docker image to harbor registry if: ${{ github.repository == 'vmware/go-ipfix' && github.event_name == 'push' && github.ref == 'refs/heads/master' }} env: - HARBOR_REGISTRY: ${{ secrets.HARBOR_REGISTRY }} - HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }} - HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} run: | - echo "$HARBOR_PASSWORD" | docker login -u "$HARBOR_USERNAME" --password-stdin $HARBOR_REGISTRY + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker push goipfix/ipfix-collector:latest \ No newline at end of file diff --git a/.github/workflows/build_tag.yml b/.github/workflows/build_tag.yml index a97c8f9f..9367f0c3 100644 --- a/.github/workflows/build_tag.yml +++ b/.github/workflows/build_tag.yml @@ -12,13 +12,12 @@ jobs: - uses: actions/checkout@v2 - name: Build go-ipfix Docker images and push to harbor registry env: - HARBOR_REGISTRY: ${{ secrets.HARBOR_REGISTRY }} - HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }} - HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} TAG: ${{ github.ref }} run: | make collector make docker-collector - echo "$HARBOR_PASSWORD" | docker login -u "$HARBOR_USERNAME" --password-stdin $HARBOR_REGISTRY + echo "DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker tag goipfix/ipfix-collector goipfix/ipfix-collector:"${TAG:10}" docker push goipfix/ipfix-collector:"${TAG:10}"