diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 71e8288f4..4ae39da6a 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -35,13 +35,13 @@ jobs: steps: - name: Check out code - if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' + if: inputs.release_type != 'pr' uses: actions/checkout@v3 with: submodules: recursive - name: Check out PR branch code - if: github.event_name == 'pull_request_target' + if: inputs.release_type == 'pr' uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} @@ -66,7 +66,7 @@ jobs: credentials_json: '${{ secrets.GCP_CREDENTIALS }}' - name: Build and Package (PR) - if: contains(github.event.pull_request.labels.*.name, 'appimage') || contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests') + if: inputs.release_type == 'pr' run: | sudo -u testbot bash -lc 'make BUILD_CHANNEL="pr-${{ github.event.pull_request.number }}" appimage' diff --git a/.github/workflows/pullrequest-trusted.yml b/.github/workflows/pullrequest-trusted.yml index dfbc6e77a..ca0e16afd 100644 --- a/.github/workflows/pullrequest-trusted.yml +++ b/.github/workflows/pullrequest-trusted.yml @@ -29,6 +29,8 @@ jobs: !contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests') && contains(github.event.pull_request.labels.*.name, 'appimage') && needs.test.result == 'success' uses: viamrobotics/viam-cartographer/.github/workflows/appimage.yml@RSDK-3591_UpdateWorkflows + with: + release_type: 'pr' secrets: GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} @@ -37,5 +39,7 @@ jobs: always() && !cancelled() && contains(github.event.pull_request.labels.*.name, 'safe to test') && contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests') uses: viamrobotics/viam-cartographer/.github/workflows/appimage.yml@RSDK-3591_UpdateWorkflows + with: + release_type: 'pr' secrets: GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}