Skip to content

ci: Remove auto-approve PRs now it is disabled at org level (#114) #107

ci: Remove auto-approve PRs now it is disabled at org level (#114)

ci: Remove auto-approve PRs now it is disabled at org level (#114) #107

Workflow file for this run

# 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: jetify-com/[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