chore(deps-dev): Bump sass-embedded from 1.100.0 to 1.102.0 in /docs #1722
Workflow file for this run
This file contains hidden or 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: Rust | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| types: [published] | |
| env: | |
| VERSION: "0.0.0-dev" | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| version: | |
| name: Start Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v7 | |
| - name: Generate Package Version (Release Tag) | |
| shell: pwsh | |
| if: github.event_name == 'release' | |
| run: Add-Content -Path $env:GITHUB_ENV -Value "VERSION=$('${{ github.event.release.tag_name }}'.substring(1))" | |
| - name: Set Package Version | |
| run: sed -i "s/^version\s*=\s*\".*\"/version = \"$VERSION\"/g" Cargo.toml | |
| - name: Stash Versioned Cargo.toml | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: cargofile | |
| path: Cargo.toml | |
| check: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| - name: cargo fmt | |
| run: cargo fmt --all --check | |
| - name: cargo clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| components: llvm-tools-preview | |
| - name: Setup Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: cargo install grcov | |
| uses: SierraSoftworks/setup-grcov@v1 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run tests | |
| run: cargo test --no-fail-fast | |
| env: | |
| RUSTFLAGS: -Cinstrument-coverage | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: grcov | |
| run: grcov . --binary-path target/debug/deps/ -s . -t lcov --ignore-not-existing --ignore '../**' --ignore '/*' --ignore 'C:/' -o ./lcov.info | |
| - name: codecov upload | |
| uses: codecov/codecov-action@v7.0.0 | |
| with: | |
| files: ./lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| build: | |
| name: ${{ matrix.os }}-${{ matrix.arch }}-release | |
| runs-on: ${{ matrix.run_on }} | |
| needs: | |
| - version | |
| strategy: | |
| matrix: | |
| include: | |
| # Windows builds | |
| - arch: amd64 | |
| os: windows | |
| run_on: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| extension: .exe | |
| builder: cargo | |
| # Linux builds | |
| - arch: amd64 | |
| run_on: ubuntu-24.04 | |
| os: linux | |
| target: x86_64-unknown-linux-gnu | |
| test: true | |
| builder: cargo | |
| - arch: "arm64" | |
| os: linux | |
| run_on: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| builder: cross | |
| # Apple MacOS builds | |
| - arch: amd64 | |
| run_on: macos-latest | |
| os: darwin | |
| target: x86_64-apple-darwin | |
| builder: cargo | |
| - arch: arm64 | |
| run_on: macos-latest | |
| os: darwin | |
| target: aarch64-apple-darwin | |
| builder: cargo | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v7 | |
| - name: Get Rust Stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.target }} | |
| components: llvm-tools-preview | |
| # Install cross *before* Setup Cache. rust-cache restores cargo's | |
| # install metadata (.crates2.json) but not the cargo bin directory, | |
| # so if the cache runs first, binstall sees cross as "already | |
| # installed", skips it, and the binary is never materialised. Running | |
| # the install against a clean CARGO_HOME (with --force) guarantees the | |
| # binary actually exists. | |
| - name: Install Cross | |
| if: matrix.builder == 'cross' | |
| shell: bash | |
| run: | | |
| curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | |
| cargo binstall --no-confirm --force cross | |
| echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> "$GITHUB_PATH" | |
| - name: Setup Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Fetch Versioned Cargo.toml | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: cargofile | |
| - name: cargo build | |
| run: ${{ matrix.builder }} build --release --target ${{ matrix.target }} | |
| - name: Upload GitHub Release Artifacts | |
| uses: SierraSoftworks/gh-releases@v1.0.10 | |
| if: github.event_name == 'release' | |
| with: | |
| files: "target/${{ matrix.target }}/release/github-backup${{ matrix.extension }} | github-backup-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.extension }}" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| overwrite: "true" | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: github-backup-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.extension }} | |
| path: target/${{ matrix.target }}/release/github-backup${{ matrix.extension }} | |
| docker-build: | |
| name: Docker Build | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| if: github.event_name == 'release' | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [linux/amd64, linux/arm64] | |
| steps: | |
| - name: set environment variables | |
| run: | | |
| platform=${{ matrix.platform }} | |
| echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | |
| image="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" | |
| image="$(echo $image | tr '[:upper:]' '[:lower:]')" | |
| echo "FULL_IMAGE_NAME=${image}" >> $GITHUB_ENV | |
| - name: Setup Docker buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| uses: docker/login-action@v4.6.0 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.FULL_IMAGE_NAME }} | |
| tags: | | |
| type=ref,event=branch | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Pull in platform artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: github-backup-${{ env.PLATFORM_PAIR }} | |
| - name: mark artifact as executable | |
| run: | | |
| chmod +x github-backup | |
| - name: Build and push by digest | |
| id: build | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| platforms: ${{ matrix.platform }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| outputs: type=image,name=${{ env.FULL_IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true,annotation-index.org.opencontainers.image.description=Backup your GitHub repositories and releases automatically | |
| - name: Export digest | |
| run: | | |
| mkdir -p /tmp/digests | |
| digest="${{ steps.build.outputs.digest }}" | |
| touch "/tmp/digests/${digest#sha256:}" | |
| - name: Upload digest | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: image-digest-${{ env.PLATFORM_PAIR }} | |
| path: /tmp/digests/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| docker-publish: | |
| name: Docker Publish | |
| runs-on: ubuntu-latest | |
| needs: | |
| - docker-build | |
| if: github.event_name == 'release' | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: set environment variables | |
| run: | | |
| image="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" | |
| image="$(echo $image | tr '[:upper:]' '[:lower:]')" | |
| echo "FULL_IMAGE_NAME=${image}" >> $GITHUB_ENV | |
| - name: Download digests | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: /tmp/digests | |
| pattern: image-digest-* | |
| merge-multiple: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.FULL_IMAGE_NAME }} | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| uses: docker/login-action@v4.6.0 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create manifest list and push | |
| working-directory: /tmp/digests | |
| run: | | |
| docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | |
| $(printf '${{ env.FULL_IMAGE_NAME }}@sha256:%s ' *) | |
| - name: Inspect image | |
| run: | | |
| docker buildx imagetools inspect ${{ env.FULL_IMAGE_NAME }}:${{ steps.meta.outputs.version }} | |
| tap: | |
| name: Update Homebrew Tap | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'release' | |
| needs: | |
| - build | |
| steps: | |
| - name: Update Homebrew Tap | |
| uses: SierraSoftworks/actions-tap@v1 | |
| with: | |
| app-id: ${{ secrets.TAP_APP_ID }} | |
| private-key: ${{ secrets.TAP_APP_PRIVATE_KEY }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aliases: major minor |