Skip to content

Commit

Permalink
fix: use pr branch when it's a pr
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam committed Sep 3, 2023
1 parent 6e3e85c commit 08ce8cf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/insider-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
env:
APP_NAME: VSCodium
ASSETS_REPOSITORY: ${{ github.repository }}-insiders
GITHUB_BRANCH: insider
GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'insider' }}
OS_NAME: linux
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
VSCODE_QUALITY: insider
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: insider
ref: ${{ env.GITHUB_BRANCH }}

- name: Check version
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/insider-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
env:
APP_NAME: VSCodium
ASSETS_REPOSITORY: ${{ github.repository }}-insiders
GITHUB_BRANCH: insider
GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'insider' }}
OS_NAME: osx
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
VSCODE_QUALITY: insider
Expand All @@ -48,7 +48,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: insider
ref: ${{ env.GITHUB_BRANCH }}

- name: Setup Node.js environment
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/insider-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
env:
APP_NAME: VSCodium
ASSETS_REPOSITORY: ${{ github.repository }}-insiders
GITHUB_BRANCH: insider
GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'insider' }}
OS_NAME: windows
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
VSCODE_QUALITY: insider
Expand Down
5 changes: 1 addition & 4 deletions get_repo.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# shellcheck disable=SC2129

set -ex
set -e

# git workaround
if [[ "${CI_BUILD}" != "no" ]]; then
Expand All @@ -12,7 +12,6 @@ if [[ -z "${RELEASE_VERSION}" ]]; then
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
if [[ "${VSCODE_LATEST}" == "yes" ]] || [[ ! -f "insider.json" ]]; then
UPDATE_INFO=$( curl --silent --fail https://update.code.visualstudio.com/api/update/darwin/insider/0000000000000000000000000000000000000000 )
echo "${UPDATE_INFO}"
else
MS_COMMIT=$( jq -r '.commit' insider.json )
MS_TAG=$( jq -r '.tag' insider.json )
Expand All @@ -23,9 +22,7 @@ if [[ -z "${RELEASE_VERSION}" ]]; then

if [[ -z "${MS_COMMIT}" ]]; then
MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
echo "${MS_COMMIT}"
MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )
echo "${MS_TAG}"

if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
MS_TAG="${MS_TAG/\-insider/}"
Expand Down

0 comments on commit 08ce8cf

Please sign in to comment.