From ca3ca9bd2fb246a43cbe10db4f67160e1e66abce Mon Sep 17 00:00:00 2001 From: Geoff Greer Date: Fri, 23 Aug 2024 14:22:35 -0700 Subject: [PATCH] Add github action to generate connector capabilities. --- .github/workflows/capabilities.yaml | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/capabilities.yaml diff --git a/.github/workflows/capabilities.yaml b/.github/workflows/capabilities.yaml new file mode 100644 index 00000000..550a1bb7 --- /dev/null +++ b/.github/workflows/capabilities.yaml @@ -0,0 +1,37 @@ +name: Output connector capabilities + +on: + push: + branches: + - main + +jobs: + calculate-capabilities: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + token: ${{ secrets.RELENG_GITHUB_TOKEN }} + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + + - name: Build + run: go build -o connector ./cmd/baton-okta + + - name: Run and save output + env: + BATON_API_TOKEN: ${{ secrets.BATON_API_TOKEN }} + BATON_DOMAIN: ${{ secrets.BATON_DOMAIN }} + run: ./connector capabilities > baton_capabilities.json + + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + message: 'Updating baton capabilities.' + add: 'baton_capabilities.json'