feat(jans-link): add ingress resource for jans-link (#1933) #147
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: updatejanshelmchart | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'charts/gluu/*' | |
jobs: | |
createPullRequest: | |
runs-on: ubuntu-latest | |
env: | |
HELM_DOCS_VERSION: "1.7.0" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo python3 -m pip install --upgrade pip | |
sudo pip3 install -r ./automation/requirements.txt | |
sudo apt-get update | |
sudo apt-get install jq | |
- name: install helm-docs | |
run: | | |
cd /tmp | |
wget https://github.com/norwoodj/helm-docs/releases/download/v${{env.HELM_DOCS_VERSION}}/helm-docs_${{env.HELM_DOCS_VERSION}}_Linux_x86_64.tar.gz | |
tar -xvf helm-docs_${{env.HELM_DOCS_VERSION}}_Linux_x86_64.tar.gz | |
sudo mv helm-docs /usr/local/sbin | |
- name: analyze chart | |
run: | | |
sudo bash automation/janssen_helm_chart/prepare_chart.sh | |
- name: Import GPG key | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
# TODO:add step to install and execute helm-docs | |
- name: Configure Git | |
run: | | |
# open branch in jannssen | |
git clone https://github.com/JanssenProject/jans.git | |
cd jans | |
git remote set-url origin https://mo-auto:${{ secrets.MOWORKFLOWTOKEN }}@github.com/JanssenProject/jans.git | |
git checkout -b cn-autoupdate-helm-charts | |
mkdir -p charts/janssen || echo "Directories exist" | |
cp -r ../charts/* charts/ | |
git config user.name "mo-auto" | |
git config user.email "[email protected]" | |
git config --global user.signingkey "${{ steps.import_gpg.outputs.keyid }}" | |
git add -A | |
git commit -S -s -m "chore(charts): update helm package" | |
git push --set-upstream origin cn-autoupdate-helm-charts | |
MESSAGE="chore(charts): update helm package" | |
ASSIGNEES="moabu" | |
BODY="This is an automated message propagated by a change in the parent Gluu chart. It will be automerged. Don't think about touching me before reaching out to @moabu." | |
LABELS="area-CI,comp-charts-jans" | |
echo "${{ secrets.MOAUTO4_WORKFLOW_TOKEN }}" > token.txt | |
gh auth login --with-token < token.txt | |
PR=$(gh pr create --assignee "${ASSIGNEES}" --base "main" --body "${BODY}" --label "${LABELS}" --reviewer "${ASSIGNEES}" --title "${MESSAGE}") | |
gh pr merge --squash --auto "${PR}" |