Skip to content

Commit

Permalink
Change the ref replacement step
Browse files Browse the repository at this point in the history
  • Loading branch information
klaasnicolaas committed Jun 29, 2024
1 parent 9db0cf3 commit 323133a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/build-firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,10 @@ jobs:
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4.1.7
- name: Determine ref
id: determine_ref
- name: 🔍 Determine ref - ESPHome packages
if: ${{ !contains(fromJSON('["workflow_dispatch", "release", "workflow_call"]'), github.event_name) }}
run: |
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
sed -i "s/ref: .*/ref: ${{ github.head_ref || 'klaas-2024-035' }}/g" ${{ matrix.firmware }}/${{ matrix.device }}.yaml
else
echo "Skipping sed command because the branch is main."
fi
sed -i "s/ref: .*/ref: ${{ github.head_ref || 'klaas-2024-035' }}/g" ${{ matrix.firmware }}/${{ matrix.device }}.yaml
- name: 🧪 Display changed YAML file
run: cat ${{ matrix.firmware }}/${{ matrix.device }}.yaml
- name: 🔨 Build firmware
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

build-docs:
name: Build documentation
# if: contains(fromJSON('["workflow_dispatch", "release"]'), github.event_name) && github.ref == 'refs/heads/main'
if: contains(fromJSON('["workflow_dispatch", "release"]'), github.event_name) && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: combined-manifests
steps:
Expand Down

0 comments on commit 323133a

Please sign in to comment.