From 16165e555b08d824f55e4b11ccab0f889fad4271 Mon Sep 17 00:00:00 2001 From: Justin Barclay Date: Mon, 16 Oct 2023 10:48:04 -0700 Subject: [PATCH] Replace tidal doctor with analyze code for main action - Move action that validates _it works_ to a subfolder --- .github/workflows/test.yml | 35 ++++++++++++++++++++++++++++++++--- action.yml | 30 ++++++++++++++++++------------ doctor/action.yml | 24 ++++++++++++++++++++++++ ping/action.yml | 24 ++++++++++++++++++++++++ 4 files changed, 98 insertions(+), 15 deletions(-) create mode 100644 doctor/action.yml create mode 100644 ping/action.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4255d8f..fbcdab0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,18 +1,47 @@ on: [push] jobs: - hello_world_job: + doctor: runs-on: ubuntu-latest - name: A job to say validate the action + name: A job to run tidal doctor steps: # To use this repository's private action, # you must check out the repository - name: Checkout uses: actions/checkout@v4 - name: Tidal Doctor action step - uses: ./ # Uses an action in the root directory + uses: ./doctor with: tidal-email: '${{ secrets.TIDAL_EMAIL }}' tidal-url: '${{ secrets.TIDAL_URL }}' tidal-password: '${{ secrets.TIDAL_PASSWORD }}' id: hello + ping: + runs-on: ubuntu-latest + name: A job to run tidal ping + steps: + # To use this repository's private action, + # you must check out the repository + - name: Checkout + uses: actions/checkout@v4 + - name: Tidal Ping action step + uses: ./ping + with: + tidal-email: '${{ secrets.TIDAL_EMAIL }}' + tidal-url: '${{ secrets.TIDAL_URL }}' + tidal-password: '${{ secrets.TIDAL_PASSWORD }}' + analyze-code: + runs-on: ubuntu-latest + name: A job to validate analyze code + steps: + # To use this repository's private action, + # you must check out the repository + - name: Checkout + uses: actions/checkout@v4 + - name: Tidal Doctor action step + uses: ./ # Uses an action in the root directory + with: + tidal-email: '${{ secrets.TIDAL_EMAIL }}' + tidal-url: '${{ secrets.TIDAL_URL }}' + tidal-password: '${{ secrets.TIDAL_PASSWORD }}' + app-id: '66' diff --git a/action.yml b/action.yml index a1dd028..5e59330 100644 --- a/action.yml +++ b/action.yml @@ -2,23 +2,29 @@ name: 'Tidal Tools Code Analysis' description: 'Run tidal' inputs: tidal-email: # id of input - description: 'Who to greet' + description: 'The email for the Tidal Accelerator service user' required: true tidal-password: - description: 'Who to greet' + description: 'The password for the Tidal Accelerator service user' required: true tidal-url: - description: 'Who to greet' + description: 'The workspace for url for your Tidal Accelerator Account ex: https://workspace.tidal.cloud' + required: true + app-id: + description: 'The ID of the application that is linked to this repository' required: true runs: using: 'docker' - image: 'gcr.io/tidal-1529434400027/tidal-tools:latest' + image: 'docker://gcr.io/tidal-1529434400027/tidal-tools:latest' args: - - 'doctor' - - '--tidal-email' - - '${{inputs.tidal-email}}' - - '--tidal-password' - - '${{inputs.tidal-password}}' - - '--tidal-url' - - '${{inputs.tidal-url}}' - + - --tidal-email + - '${{ inputs.tidal-email }}' + - --tidal-password + - '${{ inputs.tidal-password }}' + - --tidal-url + - '${{ inputs.tidal-url }}' + - analyze + - code + - --app-id + - '${{ inputs.app-id }}' + - '.' diff --git a/doctor/action.yml b/doctor/action.yml new file mode 100644 index 0000000..a1dd028 --- /dev/null +++ b/doctor/action.yml @@ -0,0 +1,24 @@ +name: 'Tidal Tools Code Analysis' +description: 'Run tidal' +inputs: + tidal-email: # id of input + description: 'Who to greet' + required: true + tidal-password: + description: 'Who to greet' + required: true + tidal-url: + description: 'Who to greet' + required: true +runs: + using: 'docker' + image: 'gcr.io/tidal-1529434400027/tidal-tools:latest' + args: + - 'doctor' + - '--tidal-email' + - '${{inputs.tidal-email}}' + - '--tidal-password' + - '${{inputs.tidal-password}}' + - '--tidal-url' + - '${{inputs.tidal-url}}' + diff --git a/ping/action.yml b/ping/action.yml new file mode 100644 index 0000000..3f06477 --- /dev/null +++ b/ping/action.yml @@ -0,0 +1,24 @@ +name: 'Tidal Tools Code Analysis' +description: 'Run tidal' +inputs: + tidal-email: # id of input + description: 'Who to greet' + required: true + tidal-password: + description: 'Who to greet' + required: true + tidal-url: + description: 'Who to greet' + required: true +runs: + using: 'docker' + image: 'gcr.io/tidal-1529434400027/tidal-tools:latest' + args: + - 'ping' + - '--tidal-email' + - '${{inputs.tidal-email}}' + - '--tidal-password' + - '${{inputs.tidal-password}}' + - '--tidal-url' + - '${{inputs.tidal-url}}' +