build(deps): bump goreleaser/goreleaser-action from 5.0.0 to 5.1.0 #79
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
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@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
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@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version-file: go.mod | |
- name: go-lint | |
uses: golangci/golangci-lint-action@38e1018663fa5173f3968ea0777460d3de38f256 # v5.3.0 |