Merge pull request #101 from vmware/dependabot/go_modules/golang.org/… #252
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push latest image if needed | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build antrea-operator Docker image | |
run: make docker-build | |
- name: Build antrea-operator-bundle Docker image | |
run: make bundle-build | |
- name: Push images to registry | |
if: ${{ github.repository == 'vmware/antrea-operator-for-kubernetes' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | |
docker push antrea/antrea-operator:latest |