Skip to content

Commit

Permalink
Add composite action to test the setup action
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Kyle Harding <[email protected]>
  • Loading branch information
klutchell committed Apr 12, 2024
1 parent c70d5e3 commit 94e9f01
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
22 changes: 22 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
name: "Test setup of balena CLI"
description: "Test setup of balena CLI composite action"
# this inputs are always provided by flowzone, so they must always be defined on the composite action
inputs:
json:
description: "JSON stringified object containing all the inputs from the calling workflow"
required: true
secrets:
description: "JSON stringified object containing all the secrets from the calling workflow"
required: true
variables:
description: "JSON stringified object containing all the variables from the calling workflow"
required: true
runs:
using: "composite"
steps:
- name: Test setup of balena CLI
uses: ./
with:
cli-version: latest
balena-token: ${{ fromJSON(inputs.secrets).BALENA_API_KEY }}
9 changes: 0 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ inputs:
balena-token:
description: "balenaCloud API token to login automatically"
required: false
# balena-env:
# description: "balenaCloud environment to use"
# required: false

# Builds and then runs as separate steps as default GitHub method does not allow passing build args
runs:
Expand Down Expand Up @@ -74,12 +71,6 @@ runs:
shell: bash
run: balena version

# - name: Setup balena environment
# if: inputs.balena-env != ''
# shell: bash
# run: |
# yq '.balenaUrl = "${{ inputs.balena-env}}"' ~/.balenarc.yml

- name: Login to balenaCloud
if: inputs.balena-token != ''
shell: bash
Expand Down

0 comments on commit 94e9f01

Please sign in to comment.