Skip to content

5 wrong port for probes in default values #3

5 wrong port for probes in default values

5 wrong port for probes in default values #3

name: release-pullrequest
on:
pull_request:
branches:
- main
jobs:
package:
runs-on: ubuntu-latest
steps:
- name: Extract and Store Trimmed Repository Name
run: |
REPO_CHART_NAME="${{ github.repository }}"
REPO_APP_NAME=$(echo "$REPO_CHART_NAME" | sed 's/-chart$//') # Remove "-chart" suffix if present
# Check if the trimmed repo exists
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/$REPO_APP_NAME")
if [[ "$HTTP_STATUS" -eq 200 ]]; then
echo "Using trimmed repository name: $REPO_APP_NAME"
echo "REPO_APP_NAME=$REPO_APP_NAME" >> $GITHUB_ENV
else
echo "Trimmed repository not found. Falling back to original repository name."
echo "REPO_APP_NAME=$REPO_CHART_NAME" >> $GITHUB_ENV
fi
- name: Use the Stored Variable
run: |
echo "Trimmed Repository Name: ${{ env.REPO_APP_NAME }}"
- name: Authenticate with GitHub App
id: authenticate
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- name: Extract latest App Version
uses: tdemin/find-latest-tag@v1
id: app_version
with:
repo: https://${{ steps.authenticate.outputs.token }}@github.com/${{ env.REPO_APP_NAME }}.git
- name: Extract latest Chart Version
uses: tdemin/find-latest-tag@v1
id: chart_version
with:
repo: https://${{ steps.authenticate.outputs.token }}@github.com/${{ github.repository }}.git
- name: Checkout
uses: actions/checkout@v3
- name: Print Version
run: |
echo APP_VERSION:${{steps.app_version.outputs.tag}}
echo CHART_VERSION:${{steps.chart_version.outputs.tag}}
- name: Replace Version in Chart.yaml
run: sed -i 's/CHART_VERSION/${{ steps.chart_version.outputs.tag }}/g' ./chart/Chart.yaml
- name: Print latest App Version
run: echo ${{ steps.app_version.outputs.tag }}
- name: Replace App Version in Chart.yaml
run: sed -i 's/APP_VERSION/${{ steps.app_version.outputs.tag }}/g' ./chart/Chart.yaml
- name: Set up Helm
uses: azure/setup-helm@v4.1.0
- name: Helm lint
run: helm lint ./chart