Skip to content

minor updates

minor updates #72

Workflow file for this run

name: Run Distros Framework
on:
push:
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
build:
name: Build and Lint
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout distros
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Go Modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build Docker image
run: docker build . -q -f scripts/Dockerfile.build -t acceptance-tests
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Get list of changed files
id: get-changed-files
run: |
files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '.*\.go$' || true)
if [ -z "$files" ]; then
echo "No Go files changed in this PR"
echo "go_files_changed=false" >> $GITHUB_OUTPUT
else
echo "Go Changed files: $files"
echo "go_files_changed=true" >> $GITHUB_OUTPUT
fi
- name: golangci-lint
if: steps.get-changed-files.outputs.go_files_changed == 'true'
uses: golangci/golangci-lint-action@v6
with:
version: v1.55.2
args: --timeout 10m
continue-on-error: false