CI test #19
Workflow file for this run
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: Fork Docker CI | |
on: | |
push: | |
branches: | |
- network-operator-* | |
tags: | |
- network-operator-* | |
jobs: | |
update_network_operator_values: | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_REGISTRY: test-docker_registry | |
DOCKER_TAG: test-docker_tag | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: sriov-network-opertor-fork | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository_owner }}/network-operator | |
path: network-opertor-fork | |
- 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 | |
la -al | |
echo 3 | |
ls -al sriov-network-operator-fork/ | |
cd network-opertor-fork | |
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 add deployment/network-operator/charts/sriov-network-operator | |
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 | |