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