diff --git a/.gitea/workflows/build-app-linux.yml b/.gitea/workflows/build-app-linux.yml index 1964818..b0d8964 100644 --- a/.gitea/workflows/build-app-linux.yml +++ b/.gitea/workflows/build-app-linux.yml @@ -17,7 +17,10 @@ jobs: - name: Determine tag id: tag run: | - TAG="${{ github.event.inputs.tag }}" + TAG="${{ inputs.tag }}" + if [ -z "$TAG" ]; then + TAG="${{ github.event.inputs.tag }}" + fi if [ -z "$TAG" ]; then TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/v*' | head -1 | sed 's|.*refs/tags/||') fi diff --git a/.gitea/workflows/build-app-macos.yml b/.gitea/workflows/build-app-macos.yml index 5a34a57..38ba639 100644 --- a/.gitea/workflows/build-app-macos.yml +++ b/.gitea/workflows/build-app-macos.yml @@ -17,7 +17,10 @@ jobs: - name: Determine tag id: tag run: | - TAG="${{ github.event.inputs.tag }}" + TAG="${{ inputs.tag }}" + if [ -z "$TAG" ]; then + TAG="${{ github.event.inputs.tag }}" + fi if [ -z "$TAG" ]; then TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/v*' | head -1 | sed 's|.*refs/tags/||') fi diff --git a/.gitea/workflows/build-app-windows.yml b/.gitea/workflows/build-app-windows.yml index 46897ab..8001ff9 100644 --- a/.gitea/workflows/build-app-windows.yml +++ b/.gitea/workflows/build-app-windows.yml @@ -16,14 +16,17 @@ jobs: steps: - name: Determine tag id: tag - shell: powershell + shell: bash run: | - $TAG = "${{ github.event.inputs.tag }}" - if (-not $TAG) { - $TAG = (git ls-remote --tags --sort=-v:refname origin 'refs/tags/v*' | Select-Object -First 1) -replace '.*refs/tags/', '' - } - Write-Host "Building for tag: ${TAG}" - echo "tag=${TAG}" >> $env:GITHUB_OUTPUT + TAG="${{ inputs.tag }}" + if [ -z "$TAG" ]; then + TAG="${{ github.event.inputs.tag }}" + fi + if [ -z "$TAG" ]; then + TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/v*' | head -1 | sed 's|.*refs/tags/||') + fi + echo "Building for tag: ${TAG}" + echo "tag=${TAG}" >> $GITHUB_OUTPUT - uses: actions/checkout@v4 with: diff --git a/.gitea/workflows/build-sidecar-linux.yml b/.gitea/workflows/build-sidecar-linux.yml index 33d4ba7..c9a604a 100644 --- a/.gitea/workflows/build-sidecar-linux.yml +++ b/.gitea/workflows/build-sidecar-linux.yml @@ -17,7 +17,10 @@ jobs: - name: Determine tag id: tag run: | - TAG="${{ github.event.inputs.tag }}" + TAG="${{ inputs.tag }}" + if [ -z "$TAG" ]; then + TAG="${{ github.event.inputs.tag }}" + fi if [ -z "$TAG" ]; then TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/sidecar-v*' | head -1 | sed 's|.*refs/tags/||') fi diff --git a/.gitea/workflows/build-sidecar-macos.yml b/.gitea/workflows/build-sidecar-macos.yml index 5398ccb..84e060b 100644 --- a/.gitea/workflows/build-sidecar-macos.yml +++ b/.gitea/workflows/build-sidecar-macos.yml @@ -17,7 +17,10 @@ jobs: - name: Determine tag id: tag run: | - TAG="${{ github.event.inputs.tag }}" + TAG="${{ inputs.tag }}" + if [ -z "$TAG" ]; then + TAG="${{ github.event.inputs.tag }}" + fi if [ -z "$TAG" ]; then TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/sidecar-v*' | head -1 | sed 's|.*refs/tags/||') fi diff --git a/.gitea/workflows/build-sidecar-windows.yml b/.gitea/workflows/build-sidecar-windows.yml index 76545d2..4c7cf4b 100644 --- a/.gitea/workflows/build-sidecar-windows.yml +++ b/.gitea/workflows/build-sidecar-windows.yml @@ -16,14 +16,17 @@ jobs: steps: - name: Determine tag id: tag - shell: powershell + shell: bash run: | - $TAG = "${{ github.event.inputs.tag }}" - if (-not $TAG) { - $TAG = (git ls-remote --tags --sort=-v:refname origin 'refs/tags/sidecar-v*' | Select-Object -First 1) -replace '.*refs/tags/', '' - } - Write-Host "Building for tag: ${TAG}" - echo "tag=${TAG}" >> $env:GITHUB_OUTPUT + TAG="${{ inputs.tag }}" + if [ -z "$TAG" ]; then + TAG="${{ github.event.inputs.tag }}" + fi + if [ -z "$TAG" ]; then + TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/sidecar-v*' | head -1 | sed 's|.*refs/tags/||') + fi + echo "Building for tag: ${TAG}" + echo "tag=${TAG}" >> $GITHUB_OUTPUT - uses: actions/checkout@v4 with: