Skip to content

use {{ github.repository }} instead of assuming repo name in build workflow #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build_loop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run: |
if [[ $(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository_owner }}/LoopWorkspace/branches | jq --raw-output '[.[] | select(.name == "alive-main" or .name == "alive-dev")] | length > 0') == "true" ]]; then
if [[ $(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/branches | jq --raw-output '[.[] | select(.name == "alive-main" or .name == "alive-dev")] | length > 0') == "true" ]]; then
echo "Branches 'alive-main' or 'alive-dev' exist."
echo "ALIVE_BRANCH_EXISTS=true" >> $GITHUB_ENV
else
Expand All @@ -85,7 +85,7 @@ jobs:
--method POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
/repos/${{ github.repository_owner }}/LoopWorkspace/git/refs \
/repos/${{ github.repository }}/git/refs \
-f ref='refs/heads/alive-main' \
-f sha=$SHA_MAIN

Expand All @@ -94,7 +94,7 @@ jobs:
--method POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
/repos/${{ github.repository_owner }}/LoopWorkspace/git/refs \
/repos/${{ github.repository }}/git/refs \
-f ref='refs/heads/alive-dev' \
-f sha=$SHA_DEV

Expand Down Expand Up @@ -333,4 +333,4 @@ jobs:
name: build-artifacts
path: |
artifacts
buildlog
buildlog