fix: removes extra coma #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Balena Disk Images | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
balena-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run read-yaml action | |
id: yaml-data | |
uses: jbutcher5/read-yaml@main # You may wish to replace main with a version tag such as '1.6' etc. | |
with: | |
file: "./balena.yml" # File to read from | |
key-path: '["version"]' # Access the runs key then the using key and retuns the value. | |
- name: Balena Deploy | |
uses: balena-labs-research/[email protected] | |
if: success() | |
with: | |
balena_cli_version: 17.2.2 | |
balena_token: ${{secrets.BALENA_TOKEN}} | |
balena_cli_commands: | | |
"push ${{secrets.BALENA_FLEET}} --release-tag v${{steps.yaml-data.outputs.data}} release" | |
balena-build-images: | |
# strategy: | |
# matrix: | |
# board: ['pi3', 'pi4'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Get base board | |
run: | | |
echo "BALENA_IMAGE=raspberrypi4-64" >> $GITHUB_ENV | |
- name: balena CLI Action - download | |
uses: balena-labs-research/[email protected] | |
with: | |
balena_token: ${{secrets.BALENA_TOKEN}} | |
balena_cli_commands: | | |
os download "$BALENA_IMAGE" \ | |
--output "$BALENA_IMAGE.img" \ | |
--version default | |
balena_cli_version: 17.2.2 | |
- name: balena CLI Action - preload | |
uses: balena-labs-research/[email protected] | |
with: | |
balena_token: ${{secrets.BALENA_TOKEN}} | |
balena_cli_commands: | | |
preload \ | |
"$BALENA_IMAGE.img" \ | |
--fleet ${{secrets.BALENA_FLEET}} \ | |
--dont-check-arch \ | |
--commit latest | |
balena_cli_version: 17.2.2 | |
- name: balena CLI Action - configure | |
uses: balena-labs-research/[email protected] | |
with: | |
balena_token: ${{secrets.BALENA_TOKEN}} | |
balena_cli_commands: | | |
os configure \ | |
"$BALENA_IMAGE.img" \ | |
--config-network=ethernet \ | |
--fleet ${{secrets.BALENA_FLEET}} | |
balena_cli_version: 17.2.2 | |
- name: Get the Ref | |
id: get-ref | |
uses: ankitvgupta/ref-to-tag-action@master | |
with: | |
ref: ${{ github.ref }} | |
head_ref: ${{ github.head_ref }} | |
- name: Zip image | |
run: | | |
zip -9 \ | |
"$BALENA_IMAGE-${{ steps.get-ref.outputs.tag }}.zip" \ | |
"$BALENA_IMAGE.img" | |
- name: "✏️ Generate release changelog" | |
id: generate-changelog | |
uses: heinrichreimer/[email protected] | |
with: | |
token: ${{ secrets.PAT }} | |
- name: Upload imgs to release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT }} | |
with: | |
tag_name: ${{ steps.get-ref.outputs.tag }} | |
body: ${{ steps.generate-changelog.outputs.changelog }} | |
files: "*.zip" | |
# Cleanup | |
# - name: Delete workflow runs | |
# uses: GitRML/delete-workflow-runs@main | |
# with: | |
# retain_days: 1 | |
# keep_minimum_runs: 3 | |
# - name: Remove old Releases | |
# uses: dev-drprasad/[email protected] | |
# if: env.UPLOAD_RELEASE == 'true' && !cancelled() | |
# with: | |
# keep_latest: 3 | |
# delete_tags: true | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |