Skip to content

Commit

Permalink
Add lint yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
romanini-ciandt committed Mar 21, 2024
1 parent fadc5a1 commit 5d89bf8
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'lint'

on:
workflow_dispatch:
pull_request:
branches:
- main

concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
lint:
name: 'lint'
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4'
- id: variables
run: |
MAKEFILE=$(find . -name Makefile -print -quit)
if [ -z "$MAKEFILE" ]; then
echo dev-tools=gcr.io/cloud-foundation-cicd/cft/developer-tools:1 >> "$GITHUB_OUTPUT"
else
VERSION=$(grep "DOCKER_TAG_VERSION_DEVELOPER_TOOLS := " $MAKEFILE | cut -d\ -f3)
IMAGE=$(grep "DOCKER_IMAGE_DEVELOPER_TOOLS := " $MAKEFILE | cut -d\ -f3)
REGISTRY=$(grep "REGISTRY_URL := " $MAKEFILE | cut -d\ -f3)
echo dev-tools=${REGISTRY}/${IMAGE}:${VERSION} >> "$GITHUB_OUTPUT"
fi
- run: docker run --rm -v ${{ github.workspace }}:/workspace ${{ steps.variables.outputs.dev-tools }} module-swapper
- run: docker run --rm -v ${{ github.workspace }}:/workspace ${{ steps.variables.outputs.dev-tools }} /usr/local/bin/test_lint.sh

0 comments on commit 5d89bf8

Please sign in to comment.