build(deps): bump serde from 1.0.218 to 1.0.219 #86
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: Build and push texas | |
on: [push] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
GOOGLE_REGISTRY: europe-north1-docker.pkg.dev | |
GITHUB_REGISTRY: ghcr.io | |
jobs: | |
openapi: | |
name: Verify openapi schema | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4 | |
- run: rustup toolchain install stable --profile minimal | |
- uses: Swatinem/rust-cache@v2 | |
- name: make openapi | |
run: | | |
make openapi | |
if [[ -n $(git status --porcelain) ]]; then | |
echo "::error::openapi spec is not up-to-date; run \`make openapi\` and commit the changes" | |
exit 1 | |
fi | |
test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4 | |
- run: rustup toolchain install stable --profile minimal | |
- uses: Swatinem/rust-cache@v2 | |
- name: cargo check | |
run: cargo check --verbose | |
- name: cargo test | |
run: cargo test --verbose --features docker | |
- name: cargo build | |
run: cargo build --verbose | |
publish: | |
name: Publish to Google and GitHub registries | |
needs: [test, openapi] | |
if: github.ref == 'refs/heads/master' | |
permissions: | |
contents: "read" | |
id-token: "write" | |
packages: "write" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4 | |
- uses: nais/platform-build-push-sign@main # ratchet:exclude | |
id: build_push_sign | |
with: | |
name: texas | |
dockerfile: Dockerfile | |
google_service_account: gh-texas | |
push: true | |
push_ghcr: true | |
multi-platform: 'true' | |
workload_identity_provider: ${{ secrets.NAIS_IO_WORKLOAD_IDENTITY_PROVIDER }} | |
- uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # ratchet:azure/setup-helm@v4 | |
name: 'Setup Helm' | |
with: | |
version: '3.16.3' | |
- name: Package chart | |
id: package_chart | |
env: | |
CHART_PATH: ./charts/texas | |
run: | | |
base_version="$(yq '.version' < "${{ env.CHART_PATH }}/Chart.yaml")" | |
chart_version="${base_version}-${{ steps.build_push_sign.outputs.version }}" | |
yq eval \ | |
'.version="'"$chart_version"'"' \ | |
"${{ env.CHART_PATH }}/Chart.yaml" --inplace | |
yq eval \ | |
'.image.tag="${{ steps.build_push_sign.outputs.version }}"' \ | |
"${{ env.CHART_PATH }}/values.yaml" --inplace | |
# helm dependency update "${{ env.CHART_PATH }}" | |
helm package "${{ env.CHART_PATH }}" --destination . | |
name=$(yq '.name' < "${{ env.CHART_PATH }}/Chart.yaml") | |
echo "name=$name" >> $GITHUB_OUTPUT | |
echo "version=$chart_version" >> $GITHUB_OUTPUT | |
echo "archive=$name-$chart_version.tgz" >> $GITHUB_OUTPUT | |
- name: Push Chart | |
run: |- | |
chart="${{ steps.package_chart.outputs.archive }}" | |
echo "Pushing: $chart" | |
helm push "$chart" oci://${{ env.GOOGLE_REGISTRY }}/nais-io/nais/feature | |
outputs: | |
chart_name: ${{ steps.package_chart.outputs.name }} | |
chart_version: ${{ steps.package_chart.outputs.version }} | |
chart_archive: ${{ steps.package_chart.outputs.archive }} | |
rollout: | |
name: Rollout | |
if: github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/master' | |
needs: publish | |
runs-on: fasit-deploy | |
permissions: | |
id-token: write | |
steps: | |
- uses: nais/fasit-deploy@v2 # ratchet:exclude | |
with: | |
chart: oci://${{ env.GOOGLE_REGISTRY }}/nais-io/nais/feature/${{ needs.publish.outputs.chart_name }} | |
version: ${{ needs.publish.outputs.chart_version }} |