Skip to content

Commit

Permalink
Handle Antrea repository change in Github workflows (#2170)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoninbas authored May 12, 2021
1 parent e8ca544 commit 6840cbe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build Antrea amd64 Docker image without pushing to registry
if: ${{ github.repository != 'vmware-tanzu/antrea' || github.event_name != 'push' || github.ref != 'refs/heads/main' }}
if: ${{ github.repository != 'antrea-io/antrea' || github.event_name != 'push' || github.ref != 'refs/heads/main' }}
run: |
./hack/build-antrea-ubuntu-all.sh --pull
- name: Build and push Antrea amd64 Docker image to registry
if: ${{ github.repository == 'vmware-tanzu/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
if: ${{ github.repository == 'antrea-io/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -46,14 +46,14 @@ jobs:
docker tag antrea/antrea-ubuntu:latest antrea/antrea-ubuntu-amd64:latest
docker push antrea/antrea-ubuntu-amd64:latest
- name: Trigger Antrea arm builds and multi-arch manifest update
if: ${{ github.repository == 'vmware-tanzu/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
if: ${{ github.repository == 'antrea-io/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: benc-uk/workflow-dispatch@v1
with:
repo: vmware-tanzu/antrea-build-infra
ref: refs/heads/main
workflow: Build Antrea ARM images and push manifest
token: ${{ secrets.ANTREA_BUILD_INFRA_WORKFLOW_DISPATCH_PAT }}
inputs: ${{ format('{{ "antrea-repository":"vmware-tanzu/antrea", "antrea-ref":"{0}", "docker-tag":"{1}" }}', github.ref, 'latest') }}
inputs: ${{ format('{{ "antrea-repository":"antrea-io/antrea", "antrea-ref":"{0}", "docker-tag":"{1}" }}', github.ref, 'latest') }}

build-scale:
needs: check-changes
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Build Antrea Agent Simulator Docker image
run: make build-scale-simulator
- name: Push Antrea Agent Simulator Docker image to registry
if: ${{ github.repository == 'vmware-tanzu/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
if: ${{ github.repository == 'antrea-io/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -81,7 +81,7 @@ jobs:
- name: Build Antrea Windows Docker image
run: make build-windows
- name: Push Antrea Windows Docker image to registry
if: ${{ github.repository == 'vmware-tanzu/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
if: ${{ github.repository == 'antrea-io/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -99,7 +99,7 @@ jobs:
- name: Build octant-antrea-ubuntu Docker image
run: make octant-antrea-ubuntu
- name: Push octant-antrea-ubuntu Docker image to registry
if: ${{ github.repository == 'vmware-tanzu/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
if: ${{ github.repository == 'antrea-io/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -117,7 +117,7 @@ jobs:
working-directory: hack/netpol
run: make build
- name: Push netpol Docker image to registry
if: ${{ github.repository == 'vmware-tanzu/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
if: ${{ github.repository == 'antrea-io/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -138,7 +138,7 @@ jobs:
- name: Check flow-aggregator Docker image
run: docker run projects.registry.vmware.com/antrea/flow-aggregator --version
- name: Push flow-aggregator Docker image to registry
if: ${{ github.repository == 'vmware-tanzu/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
if: ${{ github.repository == 'antrea-io/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
ref: refs/heads/main
workflow: Build Antrea ARM images and push manifest
token: ${{ secrets.ANTREA_BUILD_INFRA_WORKFLOW_DISPATCH_PAT }}
inputs: ${{ format('{{ "antrea-repository":"vmware-tanzu/antrea", "antrea-ref":"{0}", "docker-tag":"{1}" }}', github.ref, needs.get-version.outputs.version) }}
inputs: ${{ format('{{ "antrea-repository":"antrea-io/antrea", "antrea-ref":"{0}", "docker-tag":"{1}" }}', github.ref, needs.get-version.outputs.version) }}

build-windows:
runs-on: [windows-2019]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clair.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
if: github.repository == 'vmware-tanzu/antrea'
if: github.repository == 'antrea-io/antrea'
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
Expand All @@ -29,7 +29,7 @@ jobs:
path: clair-reports/*.json
retention-days: 90 # max value
skip:
if: github.repository != 'vmware-tanzu/antrea'
if: github.repository != 'antrea-io/antrea'
runs-on: [ubuntu-latest]
steps:
- name: Skip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lifecycle_management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
stale:
if: github.repository == 'vmware-tanzu/antrea'
if: github.repository == 'antrea-io/antrea'
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
Expand All @@ -24,7 +24,7 @@ jobs:
debug-only: false
operations-per-run: 200
skip:
if: github.repository != 'vmware-tanzu/antrea'
if: github.repository != 'antrea-io/antrea'
runs-on: ubuntu-latest
steps:
- name: Skip
Expand Down

0 comments on commit 6840cbe

Please sign in to comment.