-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: gabriel-farache <[email protected]>
- Loading branch information
1 parent
48759c9
commit 5f03378
Showing
4 changed files
with
30 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ env: | |
MVN_OPTS: "" | ||
WF_CONFIG_REPO: parodos-dev/serverless-workflows-config | ||
REGISTRY_REPO: orchestrator | ||
GH_TOKEN: ${{ secrets.HELM_REPO_TOKEN }} | ||
GH_TOKEN: ${{ secrets.HELM_REPO_TOKEN }} | ||
|
||
jobs: | ||
build-and-push-m2k-func: | ||
|
@@ -25,6 +25,13 @@ jobs: | |
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Log in to Red Hat Registry | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
registry: registry.redhat.io | ||
username: ${{ secrets.REGISTRY_REDHAT_IO_USER }} | ||
password: ${{ secrets.REGISTRY_REDHAT_IO_PASSWORD }} | ||
|
||
- name: Buildah Action | ||
id: build-image | ||
uses: redhat-actions/buildah-build@v2 | ||
|
@@ -78,32 +85,21 @@ jobs: | |
- name: Send PRs to config repo | ||
if: ${{ ! inputs.it_mode }} | ||
run: | | ||
WORKDIR=${{ runner.temp }}/serverless-workflows | ||
# determine pr or commit url | ||
if [ ${{ fromJSON(steps.get_pr_data.outputs.result)}} != "" ]; then | ||
PR_OR_COMMIT_URL="${{ fromJSON(steps.get_pr_data.outputs.result).html_url }}" | ||
else | ||
PR_OR_COMMIT_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
fi | ||
git config --global user.email "${{ github.event.head_commit.author.email || '[email protected]' }}" | ||
git config --global user.name ${{ github.event.head_commit.author.name || github.triggering_actor }} | ||
gh repo clone $WF_CONFIG_REPO config-repo | ||
cd config-repo | ||
git switch -c m2k-kfunc-autopr-$RANDOM | ||
./hack/bump_chart_version.sh move2kube --bump-tag-version | ||
yq --inplace '.kfunction.image="quay.io/orchestrator/serverless-workflow-m2k-kfunc:${{ github.sha }}"' charts/move2kube/values.yaml | ||
cd .. | ||
echo "Running create_or_update_automated_pr script" | ||
sh scripts/create_or_update_automated_pr.sh $WF_CONFIG_REPO \ | ||
${{ inputs.workflow_id }} \ | ||
${PR_OR_COMMIT_URL} \ | ||
config-repo/charts/move2kube/values.yaml \ | ||
"yq --inplace '.kfunction.image=\"quay.io/orchestrator/serverless-workflow-m2k-kfunc:'\"${GITHUB_SHA}\"'\"' charts/move2kube/values.yaml" \ | ||
scripts/create_automated_m2k_kfunc_pr.sh \ | ||
${{ github.event.head_commit.author.email || '[email protected]' }} \ | ||
${{ github.event.head_commit.author.name || github.triggering_actor }} \ | ||
$WORKDIR \ | ||
${{ env.WORKDIR }} \ | ||
${{ env.GH_TOKEN }} \ | ||
$WF_CONFIG_REPO | ||
$WF_CONFIG_REPO \ | ||
${{ github.sha }} |
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
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
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