Skip to content

Commit

Permalink
Add dynamic artifact name
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronBeneteau committed Dec 2, 2024
1 parent a96b3e2 commit d9c5c42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/reusable-build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
jobs:
build-upload-project:
runs-on: 'self-hosted'
outputs:
artifact_name: ${{ steps.prepare-artifact-name.outputs.artifact_name }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -48,3 +51,4 @@ jobs:
with:
path: firmware/build/${{ inputs.project }}/${{ inputs.platform }}
name: ${{ steps.prepare-artifact-name.outputs.artifact_name }}

11 changes: 7 additions & 4 deletions .github/workflows/test-self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
outputs:
matrix_all_projects: ${{ steps.projects.outputs.matrix_all_projects }}
matrix_modified_projects: ${{ steps.projects.outputs.matrix_modified_projects }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -66,6 +67,8 @@ jobs:
fail-fast: false
matrix:
include: ${{ fromJson(needs.setup.outputs.matrix_modified_projects) }}
outputs:
artifact_name: ${{ steps.build.outputs.artifact_name }}

steps:
- name: Checkout repository
Expand All @@ -83,15 +86,15 @@ jobs:
tags: tag:ci

- name: Download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: build-Demo-Blink-cli-31324e8
name: ${{ needs.build-modified-projects.outputs.artifact_name }}

- name: Deploy to Raspberry Pi
run: |
scp -r build-Demo-Blink-cli-31324e8 [email protected]:
scp -r ${{ needs.build-modified-projects.outputs.artifact_name }} [email protected]:
- name: Verify deployment
run: |
ssh [email protected]
ls build-Demo-Blink-cli-31324e8
ls build-Demo-Blink-cli-31324e8

0 comments on commit d9c5c42

Please sign in to comment.