Skip to content

Commit

Permalink
ci: don't run packaging in forked repo (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
thenextman authored Apr 19, 2024
1 parent 27cf592 commit abd1bbc
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,10 @@ jobs:
- name: Setup matrix
id: setup-matrix
shell: pwsh
env:
SECRET_VALUE: ${{ secrets.ARTIFACTORY_READ_TOKEN }}
run: |
$Jobs = @()
$Archs = @( 'x86_64', 'arm64' )
$Platforms = @( 'linux' )
if ($Env:SECRET_VALUE -Eq '') {
echo "::warning::Secrets not available, some jobs will be skipped"
} else {
$Platforms += 'windows'
}
$Platforms = @( 'linux', 'windows' )
$Platforms | ForEach-Object {
$Runner = switch ($_) { 'windows' { 'windows-2022' } 'linux' { 'ubuntu-20.04' } }
Expand Down Expand Up @@ -279,7 +272,7 @@ jobs:
name: devolutions-gateway-web-ui
runs-on: ubuntu-latest
needs: preflight
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

steps:
- name: Checkout ${{ github.repository }}
Expand Down Expand Up @@ -349,7 +342,7 @@ jobs:

- name: Download webapp-client
uses: actions/download-artifact@v4
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
with:
name: webapp-client
path: webapp/client
Expand Down Expand Up @@ -419,7 +412,7 @@ jobs:

- name: Package
shell: pwsh
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
env:
TARGET_OUTPUT_PATH: ${{ steps.load-variables.outputs.target-output-path }}
DGATEWAY_EXECUTABLE: ${{ steps.load-variables.outputs.dgateway-executable }}
Expand Down

0 comments on commit abd1bbc

Please sign in to comment.