Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Commit

Permalink
Fix inputs naming (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksiikutuzov authored Nov 12, 2022
1 parent 79534bc commit 080e9b0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/test_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Build test fap
uses: oleksiikutuzov/flipperzero-ufbt-action@main
with:
path: test
channel: rc

- name: Build test fap
uses: oleksiikutuzov/flipperzero-ufbt-action@main
with:
fap-dir: test
channel: rc

lint_dev:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Build test fap
uses: oleksiikutuzov/flipperzero-ufbt-action@main
with:
fap-dir: test
lint: true
- name: Build test fap
uses: oleksiikutuzov/flipperzero-ufbt-action@main
with:
path: test
lint_only: true
50 changes: 25 additions & 25 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
name: 'Build Flipper Application Package'
author: 'Oleksii Kutuzov'
description: 'Github Action that builds your fap with ufbt'
name: "Build Flipper Application Package"
author: "Oleksii Kutuzov"
description: "Github Action that builds your fap with ufbt"
branding:
icon: 'cpu'
color: 'orange'
icon: "cpu"
color: "orange"
inputs:
fap-dir:
description: 'Directory with your fap (you should checkout your repository to some folder'
path:
description: "Path to your fap source code (you should checkout your repository to some folder)"
required: true
lint:
description: 'Whether you want to build or lint your source code'
lint_only:
description: "Whether you want to build or lint your source code"
required: false
default: 'false'
default: "false"
channel:
description: 'SDK channel to use'
description: "SDK channel to use"
required: false
default: 'dev'
default: "dev"
runs:
using: 'composite'
using: "composite"
steps:
- name: Checkout ufbt
uses: actions/checkout@v3
with:
repository: flipperdevices/flipperzero-ufbt
path: flipperzero-ufbt

- name: Set path
shell: bash
run: echo "$GITHUB_WORKSPACE/flipperzero-ufbt" >> $GITHUB_PATH

- if: ${{ inputs.channel == 'dev' }}
shell: bash
run: echo "{CHANNEL}={0}" >> $GITHUB_ENV

- if: ${{ inputs.channel == 'rc' }}
shell: bash
run: echo "{CHANNEL}={1}" >> $GITHUB_ENV

- if: ${{ inputs.channel == 'release' }}
shell: bash
run: echo "{CHANNEL}={2}" >> $GITHUB_ENV

- name: Get directory.json
shell: bash
run: curl -o directory.json https://update.flipperzero.one/firmware/directory.json

- name: Extract commit id
shell: bash
run: echo "COMMIT_ID=$(jq -r '.channels[0].versions[0].version' directory.json)" >> $GITHUB_ENV

- name: Cache toolchain
id: cache-fbt
uses: actions/cache@v3
Expand All @@ -59,27 +59,27 @@ runs:
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.channel }}-${{ env.COMMIT_ID }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ inputs.channel }}-${{ env.COMMIT_ID }}
- if: ${{ steps.cache-fbt.outputs.cache-hit != 'true' }}
name: Update fbt
shell: bash
run: ufbt update --channel=${{ inputs.channel }}

- if: ${{ inputs.lint == 'true' }}
name: Build fap
shell: bash
run: cd ${{ inputs.fap-dir }}; ufbt lint

- if: ${{ inputs.lint == 'false' }}
name: Build fap
shell: bash
run: cd ${{ inputs.fap-dir }}; ufbt

- if: ${{ inputs.lint == 'false' }}
name: Get name
shell: bash
run: echo "ARTIFACT=$(basename ${{ inputs.fap-dir }}/dist/*.fap)" >> $GITHUB_ENV

- if: ${{ inputs.lint == 'false' }}
name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 080e9b0

Please sign in to comment.