Skip to content

Commit

Permalink
docs(README.md): Document PR #90 with an example & Replace TABs with …
Browse files Browse the repository at this point in the history
…4xSPC
  • Loading branch information
erikmd committed May 12, 2024
1 parent 7c98410 commit 60489d5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coq-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ jobs:
echo "### $after_ok :rocket:" >> "$GITHUB_STEP_SUMMARY"
- name: Next step
env:
docker_image: ${{ steps.docker-coq-action.outputs.docker_image}}
docker_image: ${{ steps.docker-coq-action.outputs.docker_image }}
run: |
: Summary
echo "Previous step pulled Docker image: $docker_image"
Expand Down
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ Instead, you should write one of the following variants:
script: |
startGroup "Build project"
make -j2
make test
make install
make test
make install
endGroup
```

Expand Down Expand Up @@ -661,6 +661,36 @@ variables or step outputs to the following steps, or set a Markdown summary.
Conversely, the [`export`](#export) keyword can be used to pass variables
from the previous step to `docker-coq-action`.

Here is an example of script that uses `GITHUB_ENV` and `GITHUB_OUTPUT`:


```yaml
runs-on: ubuntu-latest
strategy:
matrix:
image:
- 'coqorg/coq:latest'
fail-fast: false # don't stop jobs if one fails
steps:
- uses: actions/checkout@v3
- uses: coq-community/docker-coq-action@v1
id: docker-coq-action # needed to get step outputs
with:
opam_file: 'folder/coq-proj.opam'
custom_image: ${{ matrix.image }}
after_script: |
# Pass values to upcoming steps in two different ways
echo "coq_version_var=$(opam var coq:version)" >> "$GITHUB_ENV"
echo "coq_version_out=$(opam var coq:version)" >> "$GITHUB_OUTPUT"
- name: Next step
env:
coq_version_var2: ${{ steps.docker-coq-action.outputs.coq_version_out }}
run:
: Summary
echo "Previous step used: coq_version=$coq_version_var"
echo "Previous step used: coq_version=$coq_version_var2 (same)"
```

### Install Debian packages

If you use `docker-coq-action` with a
Expand Down

0 comments on commit 60489d5

Please sign in to comment.