Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 47 additions & 47 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,57 +252,57 @@ jobs:
retention-days: 7

# Save artifacts to gh-pages
save-master-artifacts:
name: Save master artifacts
needs: build-arduino-linux
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
# Check out repository
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{secrets.GITHUB_TOKEN}}
fetch-depth: "0"
# save-master-artifacts:
# name: Save master artifacts
# needs: build-arduino-linux
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
# runs-on: ubuntu-latest
# steps:
# # Check out repository
# - name: Checkout repository
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# with:
# token: ${{secrets.GITHUB_TOKEN}}
# fetch-depth: "0"

- name: Switch branch
run: git checkout remotes/origin/gh-pages
# - name: Switch branch
# run: git checkout remotes/origin/gh-pages

- name: Download sketches reports artifact
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
pattern: pr_cli_compile_*
merge-multiple: true
path: master_cli_compile
# - name: Download sketches reports artifact
# uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
# with:
# pattern: pr_cli_compile_*
# merge-multiple: true
# path: master_cli_compile

- name: List files in the directory
run: ls -R
# - name: List files in the directory
# run: ls -R

- name: Commit json files to gh-pages if on master
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
continue-on-error: true
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add --all
git commit -m "Updated cli compile json files"
git push origin HEAD:gh-pages
# - name: Commit json files to gh-pages if on master
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
# continue-on-error: true
# run: |
# git config user.name "github-actions[bot]"
# git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# git add --all
# git commit -m "Updated cli compile json files"
# git push origin HEAD:gh-pages

#Upload PR number as artifact
upload-pr-number:
name: Upload PR number
if: ${{ github.event_name == 'pull_request' && !startsWith(github.head_ref, 'release/') }}
runs-on: ubuntu-latest
steps:
- name: Save the PR number in an artifact
shell: bash
env:
PR_NUM: ${{ github.event.number }}
run: echo $PR_NUM > pr_num.txt
# upload-pr-number:
# name: Upload PR number
# if: ${{ github.event_name == 'pull_request' && !startsWith(github.head_ref, 'release/') }}
# runs-on: ubuntu-latest
# steps:
# - name: Save the PR number in an artifact
# shell: bash
# env:
# PR_NUM: ${{ github.event.number }}
# run: echo $PR_NUM > pr_num.txt

- name: Upload PR number
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: pr_number
path: ./pr_num.txt
overwrite: true
# - name: Upload PR number
# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
# with:
# name: pr_number
# path: ./pr_num.txt
# overwrite: true