Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Zeevi <[email protected]>
  • Loading branch information
maze88 committed Jul 3, 2024
1 parent 9b47edd commit 031d1d7
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions .github/workflows/fork-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Fork Docker CI
on:
push:
branches:
- feature/ci # TODO: remove after developing
- network-operator-*
tags:
- network-operator-*
Expand Down Expand Up @@ -46,7 +47,7 @@ jobs:
strategy:
matrix:
include:
- component: controller
- component: operator
image_name: ${{ github.event.repository.name }}
dockerfile: Dockerfile
- component: config-daemon
Expand All @@ -64,13 +65,13 @@ jobs:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ secrets.NVCR_USERNAME }}
password: ${{ secrets.NVCR_TOKEN }}
- uses: docker/build-push-action@v4
with:
platforms: ${{ env.BUILD_PLATFORMS }}
context: .
file: ${{ matrix.dockerfile }}
tags: ${{ env.DOCKER_REGISTRY }}/${{ matrix.image_name }}:${{ env.DOCKER_TAG }}
push: true
# - uses: docker/build-push-action@v4 # TODO: uncomment after testing
# with:
# platforms: ${{ env.BUILD_PLATFORMS }}
# context: .
# file: ${{ matrix.dockerfile }}
# tags: ${{ env.DOCKER_REGISTRY }}/${{ matrix.image_name }}:${{ env.DOCKER_TAG }}
# push: true

update_network_operator_values:
needs:
Expand All @@ -79,25 +80,31 @@ jobs:
runs-on: ubuntu-latest
env:
DOCKER_TAG: ${{ needs.determine_docker_registry_and_tag.outputs.docker_tag }}
GH_TOKEN: ${{ secrets.GH_TOKEN_NETWORK_OPERATOR }}
GH_TOKEN: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN_NETWORK_OPERATOR }}
token: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }}
repository: ${{ github.repository_owner }}/network-operator
sparse-checkout-cone-mode: false
sparse-checkout: deployment/network-operator/values.yaml
- name: Create PR to update image tags in network-operator values
run: |
git config user.name nvidia-ci-cd
git config user.email [email protected]
git checkout -b feature/update-sriov-tags-to-$DOCKER_TAG
sed -Ei "s/:network-operator-.+/:$DOCKER_TAG/g" deployment/network-operator/values.yaml
echo AAAAAAAAAA # debug
git branch # debug
sed -Ei "s/(version: )network-operator-.+/\\1$DOCKER_TAG/g" hack/release.yaml # TODO: test escaped backslash in github env.
echo BBBBBBBBBB # debug
git diff --color --unified=0 # debug
make release-build
echo CCCCCCCCCC # debug
if ! git diff --color --unified=0 --exit-code; then
git commit -am "task: update SR-IOV images tags to $DOCKER_TAG in chart values"
git commit -sam "task: update SR-IOV images tags to $DOCKER_TAG in chart values"
echo DDDDDDDDDD # debug
git push -u origin feature/update-sriov-tags-to-$DOCKER_TAG
echo EEEEEEEEEE # debug
gh pr create \
--repo ${{ github.repository_owner }}/network-operator \
--base master \
Expand Down

0 comments on commit 031d1d7

Please sign in to comment.