Fix actionlint for GitOps repo input

This commit is contained in:
Haitao Pan 2025-12-24 13:02:36 +08:00
parent e276310077
commit 2e7963e81f
4 changed files with 40 additions and 4 deletions

View File

@ -51,10 +51,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Normalize GitOps repo
id: gitops_repo
shell: bash
run: |
repo_input="${{ github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git' }}"
repo="${repo_input#https://github.com/}"
repo="${repo%.git}"
echo "repo=$repo" >> "$GITHUB_OUTPUT"
- name: Checkout GitOps config
uses: actions/checkout@v4
with:
repository: ${{ replace(replace(github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git', 'https://github.com/', ''), '.git', '') }}
repository: ${{ steps.gitops_repo.outputs.repo }}
path: ${{ env.GITOPS_REPO_ROOT }}
ref: ${{ github.event.inputs.gitops_repo_ref || 'main' }}

View File

@ -44,10 +44,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Normalize GitOps repo
id: gitops_repo
shell: bash
run: |
repo_input="${{ github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git' }}"
repo="${repo_input#https://github.com/}"
repo="${repo%.git}"
echo "repo=$repo" >> "$GITHUB_OUTPUT"
- name: Checkout GitOps config
uses: actions/checkout@v4
with:
repository: ${{ replace(replace(github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git', 'https://github.com/', ''), '.git', '') }}
repository: ${{ steps.gitops_repo.outputs.repo }}
path: ${{ env.GITOPS_REPO_ROOT }}
ref: ${{ github.event.inputs.gitops_repo_ref || 'main' }}

View File

@ -47,10 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Normalize GitOps repo
id: gitops_repo
shell: bash
run: |
repo_input="${{ github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git' }}"
repo="${repo_input#https://github.com/}"
repo="${repo%.git}"
echo "repo=$repo" >> "$GITHUB_OUTPUT"
- name: Checkout GitOps config
uses: actions/checkout@v4
with:
repository: ${{ replace(replace(github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git', 'https://github.com/', ''), '.git', '') }}
repository: ${{ steps.gitops_repo.outputs.repo }}
path: ${{ env.GITOPS_REPO_ROOT }}
ref: ${{ github.event.inputs.gitops_repo_ref || 'main' }}

View File

@ -48,10 +48,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Normalize GitOps repo
id: gitops_repo
shell: bash
run: |
repo_input="${{ github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git' }}"
repo="${repo_input#https://github.com/}"
repo="${repo%.git}"
echo "repo=$repo" >> "$GITHUB_OUTPUT"
- name: Checkout GitOps config
uses: actions/checkout@v4
with:
repository: ${{ replace(replace(github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git', 'https://github.com/', ''), '.git', '') }}
repository: ${{ steps.gitops_repo.outputs.repo }}
path: ${{ env.GITOPS_REPO_ROOT }}
ref: ${{ github.event.inputs.gitops_repo_ref || 'main' }}