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 7afcc3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 3 additions & 4 deletions .github/workflows/build_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

0 comments on commit 7afcc3c

Please sign in to comment.