Skip to content

Commit

Permalink
Remove atb variants input for workflow_dispatch in create_variants wo…
Browse files Browse the repository at this point in the history
…rkflow
  • Loading branch information
alessandroboron committed Mar 26, 2024
1 parent ca54821 commit ddef1dc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
5 changes: 0 additions & 5 deletions .github/actions/asana-get-build-variants-list/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ inputs:
description: "GitHub Token"
required: true
type: string
atb-variants:
description: "A list of ATB variants (comma-separated). Used when running the workflow manually."
required: false
type: string
outputs:
build-variants:
description: "The list of build variants to create"
Expand All @@ -36,6 +32,5 @@ runs:
GITHUB_TOKEN: ${{ inputs.github-token || github.token }}
ORIGIN_ASANA_SECTION_ID: ${{ inputs.origin-asana-section-id }}
ATB_ASANA_TASK_ID: ${{ inputs.atb-asana-task-id }}
ATB_VARIANT_LIST: ${{ inputs.atb-variants }}
run: |
${{ github.action_path }}/get_build_variants_task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ _create_atb_variant_pairs() {

# Fetches all the ATB variants defined in the ATB_ASANA_TASK_ID at the Variants list (comma separated) section.
_fetch_atb_variants() {
local atb_variants="${ATB_VARIANT_LIST}"
# if we call the workflow manually from GitHub `Run Workflow` use that input. Otherwise fetch it.
if [[ -z "${atb_variants}" ]]; then
local url="${asana_api_url}/tasks/${ATB_ASANA_TASK_ID}?opt_fields=notes"
local atb_variants

# fetches the items
# read the response raw
Expand All @@ -91,7 +89,6 @@ _fetch_atb_variants() {
| jq -r .data.notes \
| grep -A1 '^Variants list' \
| tail -1)"
fi

variants_list=("$(_create_atb_variant_pairs "$atb_variants")")

Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/create_variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ name: Create DMG Variants

on:
workflow_dispatch:
inputs:
atb-variants:
description: "ATB variants (comma-separated)"
required: true
type: string

workflow_call:
secrets:
BUILD_CERTIFICATE_BASE64:
Expand Down Expand Up @@ -78,7 +74,6 @@ jobs:
access-token: ${{ secrets.ASANA_ACCESS_TOKEN }}
atb-asana-task-id: ${{ vars.DMG_VARIANTS_LIST_TASK_ID }}
origin-asana-section-id: ${{ vars.DMG_VARIANTS_ORIGIN_SECTION_ID }}
atb-variants: ${{ github.event.inputs.atb-variants }} #Only used when running the workflow manually.


create-variants:
Expand Down

0 comments on commit ddef1dc

Please sign in to comment.