From 799843a4bb4d7e618d89ad7aa9f5a2b2d8a437d3 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Tue, 5 Dec 2023 12:04:08 +0000 Subject: [PATCH] style: apply auto-formatting using prettier --- call-for-testing/action.yaml | 6 +++--- get-architectures/action.yaml | 2 +- get-screenshots/action.yaml | 4 ++-- promote-to-stable/action.yaml | 4 ++-- release-to-candidate/action.yaml | 10 ++++------ test-snap-build/action.yaml | 8 ++++---- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/call-for-testing/action.yaml b/call-for-testing/action.yaml index c12a99e..55f09cd 100644 --- a/call-for-testing/action.yaml +++ b/call-for-testing/action.yaml @@ -43,12 +43,12 @@ runs: uses: actions/download-artifact@v3 with: name: "manifests" - + - name: Setup snapcraft shell: bash run: | sudo snap install snapcraft --classic - + - name: Find the snapcraft.yaml path id: yaml-path shell: bash @@ -129,7 +129,7 @@ runs: shell: bash run: | wget -qO template.md "https://raw.githubusercontent.com/${{ inputs.ci-repo }}/main/call-for-testing/template.md" - + - name: Create call for testing issue uses: JasonEtco/create-an-issue@v2 id: issue diff --git a/get-architectures/action.yaml b/get-architectures/action.yaml index 98be6f4..1c93851 100644 --- a/get-architectures/action.yaml +++ b/get-architectures/action.yaml @@ -59,7 +59,7 @@ runs: run: | # Get the list as a json array. E.g. ["amd64", "arm64"] architectures_list="$(cat "$yaml_path" | yq -r -I=0 -o=json '[.architectures[]]')" - + # Get the list as a space-separated string. E.g. "amd64" "arm64" architectures="$(cat "$yaml_path" | yq -r -I=0 -o=csv '[.architectures[]]' | tr ',' ' ')" diff --git a/get-screenshots/action.yaml b/get-screenshots/action.yaml index 0cc426a..35434c5 100644 --- a/get-screenshots/action.yaml +++ b/get-screenshots/action.yaml @@ -53,7 +53,7 @@ runs: uses: actions/download-artifact@v3 with: name: manifests - + - name: Find the snapcraft.yaml path id: yaml-path shell: bash @@ -116,7 +116,7 @@ runs: - name: Checkout screenshots repo uses: actions/checkout@v4 - with: + with: repository: ${{ inputs.screenshots-repo }} path: ci-screenshots token: ${{ inputs.screenshots-token }} diff --git a/promote-to-stable/action.yaml b/promote-to-stable/action.yaml index 302cb22..9201f26 100644 --- a/promote-to-stable/action.yaml +++ b/promote-to-stable/action.yaml @@ -34,7 +34,7 @@ runs: shell: bash run: | sudo snap install --classic snapcraft - + - name: Find the snapcraft.yaml path id: yaml-path shell: bash @@ -70,7 +70,7 @@ runs: shell: bash run: | echo "The command was '${{ steps.command.outputs.command-name }}' with arguments '${{ steps.command.outputs.command-arguments }}'" - + arguments=(${{ steps.command.outputs.command-arguments }}) revision=${arguments[0]} channel=${arguments[1]} diff --git a/release-to-candidate/action.yaml b/release-to-candidate/action.yaml index 570e1ad..4d55d99 100644 --- a/release-to-candidate/action.yaml +++ b/release-to-candidate/action.yaml @@ -24,7 +24,6 @@ inputs: description: "A token with permissions to upload to the specified channel" required: true - outputs: revision: description: "The revision of the uploaded snap" @@ -50,7 +49,7 @@ runs: - name: Find the snapcraft.yaml path id: yaml-path shell: bash - run : | + run: | if [[ -n "${{ inputs.snapcraft-yaml-path }}" ]]; then yaml_path="${{ inputs.snapcraft-yaml-path }}" else @@ -74,7 +73,6 @@ runs: echo "yaml-path=${yaml_path}" >> "$GITHUB_OUTPUT" echo "snap-name=$(yq -r '.name' "$yaml_path")" >> "$GITHUB_OUTPUT" - - name: Build the snap (${{ inputs.architecture }}) id: build shell: bash @@ -82,7 +80,7 @@ runs: yaml_path: ${{ steps.yaml-path.outputs.yaml-path }} name: ${{ steps.yaml-path.outputs.snap-name }} arch: ${{ inputs.architecture }} - run : | + run: | # Remove the architecture definition from the snapcraft.yaml due to: # https://bugs.launchpad.net/snapcraft/+bug/1885150 yq -i 'del(.architectures)' "$yaml_path" @@ -108,7 +106,7 @@ runs: shell: bash env: yaml_path: ${{ steps.yaml-path.outputs.yaml-path }} - run : | + run: | # Populate defaults echo "classic=false" >> "$GITHUB_OUTPUT" @@ -120,7 +118,7 @@ runs: # Declare the common locations for plugs/slots declarations plugs_files=("plug-declaration.json" ".github/plug-declaration.json") slots_files=("slot-declaration.json" ".github/slot-declaration.json") - + for file in "${plugs_files[@]}"; do if [[ -f "$file" ]]; then echo "plugs=$file" >> "$GITHUB_OUTPUT" diff --git a/test-snap-build/action.yaml b/test-snap-build/action.yaml index 78e39b1..f4941d2 100644 --- a/test-snap-build/action.yaml +++ b/test-snap-build/action.yaml @@ -11,7 +11,7 @@ inputs: default: "false" required: false snapcraft-yaml-path: - description: "Custom path to snapcraft.yaml for when it is not in the default location." + description: "Custom path to snapcraft.yaml for when it is not in the default location." required: false runs: @@ -50,14 +50,14 @@ runs: uses: snapcore/action-build@v1 id: build with: - path: ${{ steps.yaml-path.outputs.yaml-path }} + path: ${{ steps.yaml-path.outputs.yaml-path }} - name: Parse snap review information id: parse shell: bash env: yaml_path: ${{ steps.yaml-path.outputs.yaml-path }} - run : | + run: | # Populate defaults echo "classic=false" >> "$GITHUB_OUTPUT" @@ -69,7 +69,7 @@ runs: # Declare the common locations for plugs/slots declarations plugs_files=("plug-declaration.json" ".github/plug-declaration.json") slots_files=("slot-declaration.json" ".github/slot-declaration.json") - + for file in "${plugs_files[@]}"; do if [[ -f "$file" ]]; then echo "plugs=$file" >> "$GITHUB_OUTPUT"