forked from vmware/antrea-operator-for-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (25 loc) · 852 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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