Skip to content

Commit

Permalink
Update update_ota_repo.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
doudar committed Feb 25, 2024
1 parent 90c54a8 commit 02eefdf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/update_ota_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Update OTA Repository

on:
workflow_run:
workflows: [build] # Replace with your actual build workflow name
workflows: [build]
branches: [develop]
types:
- completed
Expand All @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: 'doudar/OTAUpdates'
token: ${{ secrets.ACCESS_TOKEN }} # Ensure this token has the appropriate permissions
token: ${{ secrets.OTA_TOKEN }}
path: 'OTAUpdates'

- name: Get Latest Release from SmartSpin2k
Expand Down Expand Up @@ -48,8 +48,8 @@ jobs:
VERSION_TAG="${{ steps.get-release.outputs.tag_name }}"
PROCESSED_VERSION="${VERSION_TAG%-*}"
echo $PROCESSED_VERSION > OTAUpdates/version.txt
cp firmware/SmartSpin2kFirmware-${PROCESSED_VERSION}.bin OTAUpdates/firmware.bin
cp firmware/littlefs.bin OTAUpdates/littlefs.bin
cp firmware/*.bin OTAUpdates/
# Assuming the archive directly contains firmware.bin and littlefs.bin
- name: Commit and Push Updates to OTAUpdates Repository
uses: EndBug/add-and-commit@v7
Expand All @@ -62,4 +62,4 @@ jobs:
pull_strategy: 'NO-PULL'
push: true
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.OTA_TOKEN }}

0 comments on commit 02eefdf

Please sign in to comment.