feat: CRD CEL post #72
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
# Copyright 2021-2023 D2iQ, Inc. All rights reserved. | |
# SPDX-License-Identifier: Apache-2.0 | |
name: checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
branches: | |
- main | |
jobs: | |
consistent-tool-versions: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
# Setup github authentication to ensure Github's rate limits are not hit. | |
- name: Configure nix GitHub access-tokens | |
run: | | |
mkdir -p ~/.config/nix | |
echo "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" > ~/.config/nix/nix.conf | |
- name: Install devbox | |
uses: jetpack-io/[email protected] | |
with: | |
enable-cache: true | |
- name: Set asdf and netlify tool versions to same as devbox | |
run: | | |
NODE_VERSION=$(devbox run -- node --version | sed 's/^v//') | |
GO_VERSION=$(devbox run -- go version | cut -d' ' -f 3 | grep -o '[0-9.]\+') | |
HUGO_VERSION=$(devbox run -- hugo version | cut -d' ' -f 2 | grep -o '[0-9.]\+') | |
sed -i -e "s/hugo .\+$/hugo extended_${HUGO_VERSION}/" \ | |
-e "s/nodejs .\+$/nodejs ${NODE_VERSION}/" \ | |
-e "s/golang .\+$/golang ${GO_VERSION}/" \ | |
.tool-versions | |
sed -i -e "s/HUGO_VERSION = .\+$/HUGO_VERSION = \"${HUGO_VERSION}\"/" \ | |
-e "s/NODE_VERSION = .\+$/NODE_VERSION = \"${NODE_VERSION}\"/" \ | |
netlify.toml | |
env: | |
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check if changed files | |
run: git diff --exit-code |