cicd: use sccache to cache workflow compilation steps #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Web | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run sccache-cache only on non-release runs | |
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch' | |
uses: mozilla-actions/[email protected] | |
- name: Set Rust caching env vars only on non-release runs | |
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch' | |
run: | | |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
- uses: actions/checkout@v4 | |
- uses: redhat-actions/buildah-build@v2 | |
with: | |
image: web | |
layers: false | |
containerfiles: | | |
Dockerfile |