Skip to content

Commit

Permalink
Fix docker image build
Browse files Browse the repository at this point in the history
  • Loading branch information
srikartati committed Nov 13, 2020
1 parent 0552af4 commit 78ad1d9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
- uses: actions/checkout@v2
- name: Build ipfix-collector Docker image
run: |
make collector
make docker-collector
- name: Push ipfix-collector Docker image to harbor registry
make collector
make docker-collector
- name: Push ipfix-collector Docker image to Antrea Docker 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
docker push goipfix/ipfix-collector:latest
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
docker tag goipfix/ipfix-collector antrea/ipfix-collector:latest
docker push antrea/ipfix-collector:latest
14 changes: 7 additions & 7 deletions .github/workflows/build_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
runs-on: [ubuntu-18.04]
steps:
- uses: actions/checkout@v2
- name: Build go-ipfix Docker images and push to harbor registry
- name: Build go-ipfix Docker images and push to Antrea Docker 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
docker tag goipfix/ipfix-collector goipfix/ipfix-collector:"${TAG:10}"
docker push goipfix/ipfix-collector:"${TAG:10}"
echo "$DOCKER_USERNAME"
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker tag goipfix/ipfix-collector antrea/ipfix-collector:"${TAG:10}"
docker push antrea/ipfix-collector:"${TAG:10}"

0 comments on commit 78ad1d9

Please sign in to comment.