Skip to content

CI test

CI test #7

Workflow file for this run

name: Fork Docker CI
on:
push:
branches:
- network-operator-*
tags:
- network-operator-*
jobs:
update_network_operator_values:
needs:
- determine_docker_registry_and_tag
- build_and_push_images
runs-on: ubuntu-latest
env:
DOCKER_REGISTRY: ${{ needs.determine_docker_registry_and_tag.outputs.docker_registry }}
DOCKER_TAG: ${{ needs.determine_docker_registry_and_tag.outputs.docker_tag }}
GH_TOKEN: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }}
steps:
- uses:actions/checkout@v4

Check failure on line 21 in .github/workflows/fork-ci.yaml

View workflow run for this annotation

GitHub Actions / Fork Docker CI

Invalid workflow file

The workflow is not valid. .github/workflows/fork-ci.yaml (Line: 21, Col: 9): Unexpected value 'uses:actions/checkout@v4'

Check failure on line 21 in .github/workflows/fork-ci.yaml

View workflow run for this annotation

GitHub Actions / Fork Docker CI

Invalid workflow file

The workflow is not valid. .github/workflows/fork-ci.yaml (Line: 21, Col: 9): Unexpected value 'uses:actions/checkout@v4'
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }}
repository: ${{ github.repository_owner }}/network-operator
- name: Determine base branch
run: |
echo "BASE_BRANCH=${{ contains(env.DOCKER_TAG, 'beta') && 'master' || env.DOCKER_TAG }}" >> $GITHUB_ENV
- name: Create PR to update image tags in network-operator values
run: |
echo 0
pwd
echo 1
ls -al
echo 2
ls -al ..
git config user.name nvidia-ci-cd
git config user.email [email protected]
git checkout -b feature/update-sriov-tags-to-$DOCKER_TAG
cp -r ../sriov-network-operator/deployment/sriov-network-operator-chart/* deployment/network-operator/charts/sriov-network-operator/
yq -i e '.SriovNetworkOperator.repository |= "${{ env.DOCKER_REGISTRY }}"' hack/release.yaml
yq -i e '.SriovNetworkOperator.version |= "${{ env.DOCKER_TAG }}"' hack/release.yaml
make release-build
if ! git diff --color --unified=0 --exit-code; then
git commit -sam "task: update SR-IOV images tags to $DOCKER_TAG in chart values"
git push -u origin feature/update-sriov-tags-to-$DOCKER_TAG
gh pr create \
--repo ${{ github.repository_owner }}/network-operator \
--base $BASE_BRANCH \
--head $(git branch --show-current) \
--fill \
--body "Created by the *${{ github.job }}* job in [${{ github.repository }} CI](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
fi