Skip to content

build(deps): bump golangci/golangci-lint-action from 5.0.0 to 5.3.0 #68

build(deps): bump golangci/golangci-lint-action from 5.0.0 to 5.3.0

build(deps): bump golangci/golangci-lint-action from 5.0.0 to 5.3.0 #68

Workflow file for this run

name: CI
on: [push, pull_request]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
tests:
runs-on: ubuntu-latest
services:
ctfd:
image: ctfd/ctfd:3.7.0@sha256:e4e886aa8f1051eeddcabe2115bc9a5f380be2b54034d5a119c44b177d6b8c57
ports:
- 8000:8000
steps:
- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
- name: Cache go modules
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Wait for CTFd server
run: |
max_attempts=60
base_url="http://localhost:8000"
for ((i=0; i<$max_attempts; i++)); do
if curl --head --fail --silent --show-error "$base_url" >/dev/null; then
echo "Server is up and running!"
break
else
echo "Waiting for the server to respond... (attempt $((i+1)))"
sleep 5
fi
done
if [ $i -eq $max_attempts ]; then
echo "Server did not respond within the allotted time. Exiting..."
exit 1
fi
- name: Setup CTFd
run: go run cmd/ctfd-setup/main.go
env:
URL: http://localhost:8000
APPEARANCE_NAME: 'CTFer.io'
APPEARANCE_DESCRIPTION: 'CTFer.io test CTFd setup'
ADMIN_NAME: 'ctfer'
ADMIN_EMAIL: '[email protected]'
ADMIN_PASSWORD: 'ctfer'
go-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
- name: go-lint
uses: golangci/golangci-lint-action@38e1018663fa5173f3968ea0777460d3de38f256 # v5.3.0