Skip to content

Commit

Permalink
Merge pull request #17 from hueristiq/dev
Browse files Browse the repository at this point in the history
Development v0.2.0
  • Loading branch information
enenumxela authored Oct 20, 2024
2 parents 417e374 + 752023c commit 9a5236b
Show file tree
Hide file tree
Showing 28 changed files with 1,495 additions and 489 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.github
bin
.gitignore
.golangci.yaml
.goreleaser.yaml
CONTRIBUTING.md
LICENSE
README.md
10 changes: 5 additions & 5 deletions .github/workflows/build-test.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🔨 Build Test
name: 🔨 Build

on:
push:
Expand All @@ -17,7 +17,7 @@ on:

jobs:
build:
name: Build Test
name: Build
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-12]
Expand All @@ -27,10 +27,10 @@ jobs:
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '>=1.20'
go-version: '>=1.23'
-
name: Checkout the code
uses: actions/checkout@v3
name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
-
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 🚨 Analyze Code (CodeQL)

on:
push:
branches:
- "main"
paths:
- '**.go'
- '**.mod'
pull_request:
branches:
- "main"
paths:
- '**.go'
- '**.mod'
workflow_dispatch:

jobs:
analyze:
name: Analyze Code (CodeQL)
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
-
name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
-
name: Autobuild
uses: github/codeql-action/autobuild@v3
-
name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
44 changes: 44 additions & 0 deletions .github/workflows/dockerhub-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 🐳 DockerHub Push

on:
workflow_run:
workflows: ["🎉 Release"]
types:
- completed
workflow_dispatch:

jobs:
push:
name: DockerHub Push
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
-
name: Checkout
uses: actions/checkout@v4

-
name: Get Github tag
id: meta
run: |
curl --silent "https://api.github.com/repos/hueristiq/xcrawl3r/releases/latest" | jq -r .tag_name | xargs -I {} echo TAG={} >> $GITHUB_OUTPUT
-
name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

-
name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: hueristiq/xcrawl3r:latest,hueristiq/xcrawl3r:${{ steps.meta.outputs.TAG }}
23 changes: 13 additions & 10 deletions .github/workflows/lint-test.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 💅 Lint Test
name: 💅 Lint

on:
push:
Expand All @@ -14,27 +14,30 @@ on:
- '**.go'
- '**.mod'
workflow_dispatch:

permissions:
contents: read

jobs:
lint:
name: Lint Test
name: Lint
runs-on: ubuntu-latest
steps:
-
name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '>=1.20'
go-version: '>=1.23'
cache: false
-
name: Checkout code
uses: actions/checkout@v3
name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.52.2
version: v1.61.0
args: --timeout 5m
working-directory: .
25 changes: 13 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: 🎉 release
name: 🎉 Release

on:
create:
branches:
- main
push:
tags:
- v*.*.*
- 'v*.*.*'
- '*.*.*'
workflow_dispatch:

jobs:
release:
Expand All @@ -16,20 +16,21 @@ jobs:
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '>=1.20'
go-version: '>=1.23'
-
name: Checkout code
uses: actions/checkout@v3
name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
args: "release --clean"
distribution: goreleaser
version: latest
args: "release --clean"
workdir: .
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
SLACK_WEBHOOK: "${{ secrets.SLACK_WEBHOOK }}"
DISCORD_WEBHOOK_ID: "${{ secrets.DISCORD_WEBHOOK_ID }}"
DISCORD_WEBHOOK_TOKEN: "${{ secrets.DISCORD_WEBHOOK_TOKEN }}"
DISCORD_WEBHOOK_TOKEN: "${{ secrets.DISCORD_WEBHOOK_TOKEN }}"
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
# Executable

cmd/xcrawl3r/xcrawl3r

# Notes

notes.txt
bin
Loading

0 comments on commit 9a5236b

Please sign in to comment.