build(deps): bump actions/checkout from 4.1.7 to 4.2.1 #24
Workflow file for this run
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: Release kubernetes-prometheus-process | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/release-prometheus-process.yml | |
push: | |
tags: | |
- 'kubert-prometheus-process/*' | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
RUSTUP_MAX_RETRIES: 10 | |
permissions: | |
contents: read | |
jobs: | |
cleanup: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
steps: | |
- uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa | |
with: | |
all_but_latest: true | |
access_token: ${{ github.token }} | |
meta: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
container: ghcr.io/linkerd/dev:v43-rust | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 | |
- id: meta | |
shell: bash | |
run: | | |
ref="${{ github.ref }}" | |
if [[ "$ref" == refs/tags/kubert-prometheus-process/* ]]; then | |
version="${ref##refs/tags/kubert-prometheus-process/}" | |
crate=$(just-cargo crate-version kubert-prometheus-process) | |
if [[ "$crate" != "$version" ]]; then | |
echo "::error ::Crate version $crate does not match tag $version" >&2 | |
exit 1 | |
fi | |
( echo version="$version" | |
echo mode=release | |
) >> "$GITHUB_OUTPUT" | |
else | |
sha="${{ github.sha }}" | |
( echo version="$(just-cargo crate-version kubert-prometheus-process)-git-${sha:0:7}" | |
echo mode=test | |
) >> "$GITHUB_OUTPUT" | |
fi | |
outputs: | |
mode: ${{ steps.meta.outputs.mode }} | |
version: ${{ steps.meta.outputs.version }} | |
release: | |
needs: [meta] | |
permissions: | |
contents: write | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- if: needs.meta.outputs.mode == 'release' | |
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 | |
with: | |
name: kubert-prometheus-process ${{ needs.meta.outputs.version }} | |
generate_release_notes: false | |
make_latest: false | |
crate: | |
# Only publish the crate after the rest of the release succeeds. | |
needs: [meta, release] | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
container: ghcr.io/linkerd/dev:v43-rust | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 | |
- run: cargo publish --package=kubert-prometheus-process --dry-run | |
- if: needs.meta.outputs.mode == 'release' | |
run: cargo publish --package=kubert-prometheus-process --token=${{ secrets.CRATESIO_TOKEN }} |