diff --git a/.github/workflows/glmakie.yaml b/.github/workflows/glmakie.yaml index 02c4804045f..10e80561807 100644 --- a/.github/workflows/glmakie.yaml +++ b/.github/workflows/glmakie.yaml @@ -66,9 +66,11 @@ jobs: - name: Save number of missing refimages to file env: N_MISSING: ${{ steps.referencetests.outputs.n_missing_refimages }} + COMMIT_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} run: | mkdir -p ./n_missing echo $N_MISSING > ./n_missing/n_missing_refimages + echo $COMMIT_SHA >> ./n_missing/n_missing_refimages - name: Upload artifact with number of missing refimages uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/refimages_status.yaml b/.github/workflows/refimages_status.yaml index f0d00366332..e11010cacee 100644 --- a/.github/workflows/refimages_status.yaml +++ b/.github/workflows/refimages_status.yaml @@ -45,12 +45,15 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | let fs = require('fs'); - let n_missing = Number(fs.readFileSync('./n_missing_refimages')); + let content = fs.readFileSync('./n_missing_refimages', { encoding: 'utf8' }); + let lines = content.split('\n'); + let n_missing = Number(lines[0]); + let commit_sha = lines[1]; await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', { owner: context.repo.owner, repo: context.repo.repo, - sha: "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}", + sha: commit_sha, state: n_missing === 0 ? 'success' : 'failure', target_url: null, description: n_missing + " missing refimages must be uploaded", @@ -58,7 +61,5 @@ jobs: headers: { 'X-GitHub-Api-Version': '2022-11-28' } - }) - - + }) \ No newline at end of file diff --git a/docs/_css/makie.css b/docs/_css/makie.css index 2d2d27eff86..eff07ce7b1c 100644 --- a/docs/_css/makie.css +++ b/docs/_css/makie.css @@ -778,6 +778,10 @@ button.copy-code { align-items: center; } +button.copy-code .far { + font-family: "Font Awesome 5 Free"; +} + .copied-text { font-size: 0.6em; margin-right: 0.2em;