From 56f44a07eeff1b54acfdd25beb4d1348825db54f Mon Sep 17 00:00:00 2001 From: Shalev Avhar <51760613+shalev007@users.noreply.github.com> Date: Sun, 9 Jun 2024 19:37:22 +0300 Subject: [PATCH] chore: Update test.yml workflow to include Port base URL (#4) Add port base_url to image --------- Co-authored-by: Shalev Avhar --- .github/workflows/test.yml | 4 ++-- RELEASES.md | 4 ++++ action.yml | 20 ++++++++++++-------- package.json | 2 +- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9bb0433..f77c403 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,6 @@ name: test on: workflow_dispatch: - jobs: test: runs-on: ubuntu-latest @@ -15,7 +14,8 @@ jobs: type: 'jira' port_client_id: ${{ secrets.PORT_CLIENT_ID }} port_client_secret: ${{ secrets.PORT_CLIENT_SECRET }} + port_base_url: https://app.getport.io config: | jira_host: ${{ secrets.JIRA_HOST }} atlassian_user_email: ${{ secrets.JIRA_USER_EMAIL }} - atlassian_user_token: ${{ secrets.JIRA_USER_TOKEN }} \ No newline at end of file + atlassian_user_token: ${{ secrets.JIRA_USER_TOKEN }} diff --git a/RELEASES.md b/RELEASES.md index d78115f..9863f24 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,5 +1,9 @@ # Releases ### 1.0.0 + - Initial release of the ocean sail action +### 1.1.0 + +- Add support for the `port base_url` configuration option diff --git a/action.yml b/action.yml index d3c0966..21f6847 100644 --- a/action.yml +++ b/action.yml @@ -16,6 +16,9 @@ inputs: port_client_secret: description: 'The Port client secret' required: true + port_base_url: + description: 'The Port base URL' + required: false initialize_port_resources: description: 'Should Ocean try to create the default resources (blueprints, pages, integration config, etc.) provided with the integration' required: false @@ -41,7 +44,7 @@ outputs: description: 'The exit code of the Ocean Sail command' value: ${{ steps.ocean-sail.outputs.exit_code }} runs: - using: "composite" + using: 'composite' steps: - name: ✅ Validate inputs shell: bash @@ -60,17 +63,18 @@ runs: if [[ "${{ inputs.image }}" ]]; then image_name="${{ inputs.image }}:${{ inputs.version }}" fi - + echo "OCEAN__PORT__CLIENT_ID=${{ inputs.port_client_id }}" >> .sail-env echo "OCEAN__PORT__CLIENT_SECRET=${{ inputs.port_client_secret }}" >> .sail-env - + echo "OCEAN__PORT__BASE_URL=${{ inputs.port_base_url }}" >> .sail-env + echo "OCEAN__EVENT_LISTENER={\"type\":\"ONCE\"}" >> .sail-env echo "OCEAN__INITIALIZE_PORT_RESOURCES=${{ inputs.initialize_port_resources }}" >> .sail-env - + if [[ "${{ inputs.identifier }}" ]]; then echo "OCEAN__INTEGRATION__IDENTIFIER=${{ inputs.identifier }}" >> .sail-env fi - + if [[ "${{ inputs.config }}" ]]; then for key in $(echo "${{ inputs.config }}" | yq eval "keys | .[]"); do value=$(echo "${{ inputs.config }}" | yq eval ".$key") @@ -78,11 +82,11 @@ runs: echo "OCEAN__INTEGRATION__CONFIG__${upper_key}=${value}" >> .sail-env done fi - + env >> .sail-env - + docker run -i --rm --platform=${{ inputs.platform }} --env-file .sail-env $image_name - + echo "exit_code=$?" >> $GITHUB_ENV - name: 🧹 Cleanup diff --git a/package.json b/package.json index f35fd1c..fcc05c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ocean-sail", - "version": "1.0.0", + "version": "1.1.0", "repository": "git@github.com:port-labs/ocean-sail.git", "author": "yair ", "license": "Apache-2.0",