Skip to content
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
128 changes: 67 additions & 61 deletions .github/workflows/pullrequest-trusted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,84 +6,90 @@ concurrency:

on:
pull_request_target:
branches: [ main ]
branches: [ alexi/testing-workflows ]
types: [ labeled ]

# To test workflow updates you need to work in a branch directly on viamrobotics/rdk
# and tag your working branch instead of @main in any viamrobotics/rdk "uses" below.
# Don't forget to tag back to @main before merge.

jobs:
fake-step:
if: github.event.label.name == 'safe to test' || github.event.label.name == 'appimage'
runs-on: ubuntu-latest
steps:
- name: Always pass
run: echo "This step always passes"
test:
if: (github.event.label.name == 'safe to test' || github.event.label.name == 'appimage')
uses: viamrobotics/rdk/.github/workflows/test.yml@main
uses: viamrobotics/rdk/.github/workflows/test.yml@goutils-031
secrets:
MONGODB_TEST_OUTPUT_URI: ${{ secrets.MONGODB_TEST_OUTPUT_URI }}
DOCKER_PUBLIC_READONLY_PAT: ${{ secrets.DOCKER_PUBLIC_READONLY_PAT }}

# This lets people add an "appimage" tag to have appimages built for the PR
appimage:
needs: [test]
if: |
always() && !cancelled() && contains(github.event.pull_request.labels.*.name, 'safe to test') &&
!contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests') &&
contains(github.event.pull_request.labels.*.name, 'appimage') && needs.test.result == 'success'
uses: viamrobotics/rdk/.github/workflows/appimage.yml@main
with:
release_type: 'pr'
secrets:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
# # This lets people add an "appimage" tag to have appimages built for the PR
# appimage:
# needs: [test]
# if: |
# always() && !cancelled() && contains(github.event.pull_request.labels.*.name, 'safe to test') &&
# !contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests') &&
# contains(github.event.pull_request.labels.*.name, 'appimage') && needs.test.result == 'success'
# uses: viamrobotics/rdk/.github/workflows/appimage.yml@main
# with:
# release_type: 'pr'
# secrets:
# GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

appimage-ignore-tests:
if: |
always() && !cancelled() && contains(github.event.pull_request.labels.*.name, 'safe to test') &&
contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests')
uses: viamrobotics/rdk/.github/workflows/appimage.yml@main
with:
release_type: 'pr'
secrets:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
# appimage-ignore-tests:
# if: |
# always() && !cancelled() && contains(github.event.pull_request.labels.*.name, 'safe to test') &&
# contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests')
# uses: viamrobotics/rdk/.github/workflows/appimage.yml@main
# with:
# release_type: 'pr'
# secrets:
# GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

# This lets people add a "static-build" tag to have static binaries built for the PR
static:
needs: [test]
if: |
always() && !cancelled() && contains(github.event.pull_request.labels.*.name, 'safe to test') &&
!contains(github.event.pull_request.labels.*.name, 'static-ignore-tests') &&
contains(github.event.pull_request.labels.*.name, 'static-build') && needs.test.result == 'success'
uses: viamrobotics/rdk/.github/workflows/staticbuild.yml@main
with:
release_type: 'pr'
secrets:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
# # This lets people add a "static-build" tag to have static binaries built for the PR
# static:
# needs: [test]
# if: |
# always() && !cancelled() && contains(github.event.pull_request.labels.*.name, 'safe to test') &&
# !contains(github.event.pull_request.labels.*.name, 'static-ignore-tests') &&
# contains(github.event.pull_request.labels.*.name, 'static-build') && needs.test.result == 'success'
# uses: viamrobotics/rdk/.github/workflows/staticbuild.yml@main
# with:
# release_type: 'pr'
# secrets:
# GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

static-ignore-tests:
if: |
always() && !cancelled() && contains(github.event.pull_request.labels.*.name, 'safe to test') &&
contains(github.event.pull_request.labels.*.name, 'static-ignore-tests')
uses: viamrobotics/rdk/.github/workflows/staticbuild.yml@main
with:
release_type: 'pr'
secrets:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
# static-ignore-tests:
# if: |
# always() && !cancelled() && contains(github.event.pull_request.labels.*.name, 'safe to test') &&
# contains(github.event.pull_request.labels.*.name, 'static-ignore-tests')
# uses: viamrobotics/rdk/.github/workflows/staticbuild.yml@main
# with:
# release_type: 'pr'
# secrets:
# GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

droid:
needs: test
uses: viamrobotics/rdk/.github/workflows/droid.yml@main
with:
release_type: 'pr'
secrets:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
# droid:
# needs: test
# uses: viamrobotics/rdk/.github/workflows/droid.yml@main
# with:
# release_type: 'pr'
# secrets:
# GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

macos:
uses: viamrobotics/rdk/.github/workflows/macos.yml@main
# macos:
# uses: viamrobotics/rdk/.github/workflows/macos.yml@main

license_finder:
uses: viamrobotics/rdk/.github/workflows/license_finder.yml@main
# license_finder:
# uses: viamrobotics/rdk/.github/workflows/license_finder.yml@main

cli:
uses: viamrobotics/rdk/.github/workflows/cli.yml@main
with:
release_type: pr
secrets:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
# cli:
# uses: viamrobotics/rdk/.github/workflows/cli.yml@main
# with:
# release_type: pr
# secrets:
# GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
Loading