From 6dc7dca9f58bdf779f22c4432f2a2dae911c3f1c Mon Sep 17 00:00:00 2001 From: Sebastian Bauersfeld Date: Fri, 11 Mar 2022 13:52:16 +0700 Subject: [PATCH] Use intermediate variables in action.yml --- action.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/action.yml b/action.yml index 5d83f0f..6bbf827 100644 --- a/action.yml +++ b/action.yml @@ -41,19 +41,29 @@ runs: - name: Run GitHub to Jira Sync working-directory: ${{ github.action_path }} shell: bash + env: + INPUTS_GITHUB_TOKEN: ${{ inputs.github_token }} + INPUTS_JIRA_URL: ${{ inputs.jira_url }} + INPUTS_JIRA_USER: ${{ inputs.jira_user }} + INPUTS_JIRA_TOKEN: ${{ inputs.jira_token }} + INPUTS_JIRA_PROJECT: ${{ inputs.jira_project }} + INPUTS_JIRA_LABELS: ${{ inputs.jira_labels }} + INPUTS_SYNC_DIRECTION: ${{ inputs.sync_direction }} + INPUTS_ISSUE_END_STATE: ${{ inputs.issue_end_state }} + INPUTS_ISSUE_REOPEN_STATE: ${{ inputs.issue_reopen_state }} run: | pip3 install -r requirements.txt REPOSITORY_NAME="$(echo "$GITHUB_REPOSITORY" | cut -d/ -f 2)" ./gh2jira sync \ --gh-url "$GITHUB_API_URL" \ - --gh-token "${{ inputs.github_token }}" \ + --gh-token "$INPUTS_GITHUB_TOKEN" \ --gh-org "$GITHUB_REPOSITORY_OWNER" \ --gh-repo "$REPOSITORY_NAME" \ - --jira-url "${{ inputs.jira_url }}" \ - --jira-user "${{ inputs.jira_user }}" \ - --jira-token "${{ inputs.jira_token }}" \ - --jira-project "${{ inputs.jira_project }}" \ - --jira-labels "${{ inputs.jira_labels }}" \ - --direction "${{ inputs.sync_direction }}" \ - --issue-end-state "${{ inputs.issue_end_state }}" \ - --issue-reopen-state "${{ inputs.issue_reopen_state }}" + --jira-url "$INPUTS_JIRA_URL" \ + --jira-user "$INPUTS_JIRA_USER" \ + --jira-token "$INPUTS_JIRA_TOKEN" \ + --jira-project "$INPUTS_JIRA_PROJECT" \ + --jira-labels "$INPUTS_JIRA_LABELS" \ + --direction "$INPUTS_SYNC_DIRECTION" \ + --issue-end-state "$INPUTS_ISSUE_END_STATE" \ + --issue-reopen-state "$INPUTS_ISSUE_REOPEN_STATE"