ci: harden env variable usage (#4266)
This commit is contained in:
parent
9f6c832583
commit
3239f2e1a4
5 changed files with 28 additions and 35 deletions
2
.github/workflows/ci-copr.yml
vendored
2
.github/workflows/ci-copr.yml
vendored
|
|
@ -59,7 +59,7 @@ jobs:
|
|||
run: ls -l artifacts
|
||||
|
||||
- name: Update GitHub Release
|
||||
uses: LizardByte/actions/actions/release_create@v2025.914.154454
|
||||
uses: LizardByte/actions/actions/release_create@v2025.917.25039
|
||||
with:
|
||||
allowUpdates: true
|
||||
body: ${{ github.event.release.body }}
|
||||
|
|
|
|||
22
.github/workflows/ci-flatpak.yml
vendored
22
.github/workflows/ci-flatpak.yml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
steps:
|
||||
- name: More space
|
||||
if: matrix.arch == 'x86_64'
|
||||
uses: LizardByte/actions/actions/more_space@v2025.914.154454
|
||||
uses: LizardByte/actions/actions/more_space@v2025.917.25039
|
||||
with:
|
||||
analyze-space-savings: true
|
||||
clean-all: true
|
||||
|
|
@ -99,23 +99,19 @@ jobs:
|
|||
|
||||
- name: Configure Flatpak Manifest
|
||||
env:
|
||||
BRANCH: ${{ github.head_ref }}
|
||||
BRANCH: ${{ github.ref }}
|
||||
run: |
|
||||
# variables for manifest
|
||||
branch="${{ env.BRANCH }}"
|
||||
build_version=${{ inputs.release_version }}
|
||||
commit=${{ inputs.release_commit }}
|
||||
branch="${BRANCH}"
|
||||
build_version="${{ inputs.release_version }}"
|
||||
commit="${{ inputs.release_commit }}"
|
||||
clone_url="${{ github.event.repository.clone_url }}"
|
||||
|
||||
# check the branch variable
|
||||
if [ -z "$branch" ]
|
||||
then
|
||||
if [ "${{ github.event_name }}" == "push" ]; then
|
||||
echo "This is a PUSH event"
|
||||
branch=${{ github.ref_name }}
|
||||
clone_url=${{ github.event.repository.clone_url }}
|
||||
else
|
||||
echo "This is a PR event"
|
||||
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
|
||||
branch="${{ github.ref_name }}"
|
||||
fi
|
||||
|
||||
echo "Branch: ${branch}"
|
||||
echo "Commit: ${commit}"
|
||||
echo "Clone URL: ${clone_url}"
|
||||
|
|
|
|||
30
.github/workflows/ci-homebrew.yml
vendored
30
.github/workflows/ci-homebrew.yml
vendored
|
|
@ -79,31 +79,27 @@ jobs:
|
|||
PR_DEFAULT_BRANCH: ${{ github.event.pull_request.head.repo.default_branch }}
|
||||
run: |
|
||||
# variables for formula
|
||||
branch="${{ env.HEAD_REF }}"
|
||||
build_version=${{ inputs.release_version }}
|
||||
commit=${{ inputs.release_commit }}
|
||||
|
||||
# check the branch variable
|
||||
if [ -z "$branch" ]
|
||||
then
|
||||
echo "This is a PUSH event"
|
||||
clone_url=${{ github.event.repository.clone_url }}
|
||||
branch="${{ github.ref_name }}"
|
||||
branch="${HEAD_REF}"
|
||||
build_version="${{ inputs.release_version }}"
|
||||
clone_url="${{ github.event.repository.clone_url }}"
|
||||
commit="${{ inputs.release_commit }}"
|
||||
default_branch="${{ github.event.repository.default_branch }}"
|
||||
tag="${{ github.ref_name }}"
|
||||
|
||||
if [ "${{ github.event_name }}" == "push" ]; then
|
||||
echo "This is a PUSH event"
|
||||
if [ "${{ matrix.release }}" == "true" ]; then
|
||||
# we will publish the formula with the release tag
|
||||
tag="${{ inputs.release_tag }}"
|
||||
else
|
||||
tag="${{ github.ref_name }}"
|
||||
fi
|
||||
else
|
||||
elif [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
echo "This is a PR event"
|
||||
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
|
||||
branch="${{ env.PR_HEAD_REF }}"
|
||||
default_branch="${{ env.PR_DEFAULT_BRANCH }}"
|
||||
tag="${{ env.PR_HEAD_REF }}"
|
||||
branch="${PR_HEAD_REF}"
|
||||
default_branch="${PR_DEFAULT_BRANCH}"
|
||||
tag="${PR_HEAD_REF}"
|
||||
fi
|
||||
|
||||
echo "Branch: ${branch}"
|
||||
echo "Clone URL: ${clone_url}"
|
||||
echo "Tag: ${tag}"
|
||||
|
|
@ -153,7 +149,7 @@ jobs:
|
|||
- name: Validate Homebrew Formula
|
||||
id: test
|
||||
if: matrix.release != true
|
||||
uses: LizardByte/actions/actions/release_homebrew@v2025.914.154454
|
||||
uses: LizardByte/actions/actions/release_homebrew@v2025.917.25039
|
||||
with:
|
||||
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
|
||||
git_email: ${{ secrets.GIT_EMAIL }}
|
||||
|
|
|
|||
2
.github/workflows/ci-linux.yml
vendored
2
.github/workflows/ci-linux.yml
vendored
|
|
@ -28,7 +28,7 @@ jobs:
|
|||
dist: 22.04
|
||||
steps:
|
||||
- name: More space
|
||||
uses: LizardByte/actions/actions/more_space@v2025.914.154454
|
||||
uses: LizardByte/actions/actions/more_space@v2025.917.25039
|
||||
with:
|
||||
analyze-space-savings: true
|
||||
clean-all: true
|
||||
|
|
|
|||
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
|
@ -43,7 +43,8 @@ jobs:
|
|||
|
||||
- name: Release Setup
|
||||
id: release-setup
|
||||
uses: LizardByte/actions/actions/release_setup@v2025.914.154454
|
||||
uses: LizardByte/actions/actions/release_setup@v2025.917.25039
|
||||
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
|
@ -202,7 +203,7 @@ jobs:
|
|||
run: ls -l artifacts
|
||||
|
||||
- name: Create/Update GitHub Release
|
||||
uses: LizardByte/actions/actions/release_create@v2025.914.154454
|
||||
uses: LizardByte/actions/actions/release_create@v2025.917.25039
|
||||
with:
|
||||
allowUpdates: false
|
||||
body: ${{ needs.release-setup.outputs.release_body }}
|
||||
|
|
@ -231,7 +232,7 @@ jobs:
|
|||
path: homebrew
|
||||
|
||||
- name: Upload Homebrew Beta Formula
|
||||
uses: LizardByte/actions/actions/release_homebrew@v2025.914.154454
|
||||
uses: LizardByte/actions/actions/release_homebrew@v2025.917.25039
|
||||
with:
|
||||
formula_file: ${{ github.workspace }}/homebrew/sunshine-beta.rb
|
||||
git_email: ${{ secrets.GH_BOT_EMAIL }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue