Skip to content

Commit

Permalink
code review changes: allow inputs for worflow_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
neel-astro committed Sep 17, 2024
1 parent 35cdf8c commit 810090d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,40 +44,40 @@ jobs:
if [ "${{ github.event.inputs.workspace_id }}" != "" ]; then
echo "Using provided workspace_id"
echo "::set-output name=workspace_id::${{ github.event.inputs.workspace_id }}"
echo "workspace_id=${{ github.event.inputs.workspace_id }}" >> GITHUB_OUTPUT
else
echo "::set-output name=workspace_id::${{ secrets.WORKSPACE_ID }}"
echo "workspace_id=${{ secrets.WORKSPACE_ID }}" >> GITHUB_OUTPUT
fi
if [ "${{ github.event.inputs.org_id }}" != "" ]; then
echo "Using provided org_id"
echo "::set-output name=org_id::${{ github.event.inputs.org_id }}"
echo "org_id=${{ github.event.inputs.org_id }}" >> GITHUB_OUTPUT
else
echo "::set-output name=org_id::${{ secrets.ORGANIZATION_ID }}"
echo "org_id=${{ secrets.ORGANIZATION_ID }}" >> GITHUB_OUTPUT
fi
if [ "${{ github.event.inputs.astronomer_host }}" != "" ]; then
echo "Using provided astronomer_host"
echo "::set-output name=astronomer_host::${{ github.event.inputs.astronomer_host }}"
echo "astronomer_host=${{ github.event.inputs.astronomer_host }}" >> GITHUB_OUTPUT
else
echo "::set-output name=astronomer_host::${{ secrets.ASTRONOMER_HOST }}"
echo "astronomer_host=${{ secrets.ASTRONOMER_HOST }}" >> GITHUB_OUTPUT
fi
if [ "${{ github.event.inputs.token }}" != "" ]; then
echo "Using provided token"
echo "ASTRO_API_TOKEN=${{ github.event.inputs.token }}" >> $GITHUB_ENV
echo "::set-output name=token::${{ github.event.inputs.token }}"
echo "token=${{ github.event.inputs.token }}" >> GITHUB_OUTPUT
else
echo "ASTRO_API_TOKEN=${{ secrets.ASTRO_API_TOKEN }}" >> $GITHUB_ENV
echo "::set-output name=token::${{ secrets.ASTRO_API_TOKEN }}"
echo "token=${{ secrets.ASTRO_API_TOKEN }}" >> GITHUB_OUTPUT
fi
- name: Redact sensitive information
run: |
echo "::add-mask::${{ github.event.inputs.workspace_id }}"
echo "::add-mask::${{ github.event.inputs.org_id }}"
echo "::add-mask::${{ github.event.inputs.astronomer_host }}"
echo "::add-mask::${{ github.event.inputs.token }}"
echo "::add-mask::${{ steps.set-env.outputs.workspace_id }}"
echo "::add-mask::${{ steps.set-env.outputs.org_id }}"
echo "::add-mask::${{ steps.set-env.outputs.astronomer_host }}"
echo "::add-mask::${{ steps.set-env.outputs.token }}"
# Create test deployments would use the template files and generate deployments with unique names
create-test-deployments:
Expand Down

0 comments on commit 810090d

Please sign in to comment.