Skip to content

Commit

Permalink
Merge pull request #56 from ataseren/main
Browse files Browse the repository at this point in the history
  • Loading branch information
ErdemOzgen authored Nov 4, 2024
2 parents 0af4728 + d9f0e70 commit 9573f13
Show file tree
Hide file tree
Showing 491 changed files with 29,268 additions and 35,582 deletions.
26 changes: 13 additions & 13 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
version: 2
updates:
# For the Golang application
- package-ecosystem: "gomod" # This is for Golang modules
directory: "/" # Adjust if your Golang module manifest (go.mod) is in a subdirectory
schedule:
interval: "weekly" # Dependabot will check for updates weekly

# For the React application
- package-ecosystem: "npm" # This is for npm packages used by your React app
directory: "/ui/" # Replace with the path to your React app's directory where package.json is located
schedule:
interval: "weekly" # Dependabot will check for updates weekly
version: 2
updates:
# For the Golang application
- package-ecosystem: "gomod" # This is for Golang modules
directory: "/" # Adjust if your Golang module manifest (go.mod) is in a subdirectory
schedule:
interval: "weekly" # Dependabot will check for updates weekly

# For the React application
- package-ecosystem: "npm" # This is for npm packages used by your React app
directory: "/ui/" # Replace with the path to your React app's directory where package.json is located
schedule:
interval: "weekly" # Dependabot will check for updates weekly
84 changes: 42 additions & 42 deletions .github/workflows/build-docker-image.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
name: Build and Push Docker Image
on:
create:
tags:
- '*'
jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Clean up directories
run: |
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Clean up Docker
run: |
docker system prune -af
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push Docker Image
env:
DOCKER_BUILDKIT: 1
run: |
docker buildx create --use
# Ensure experimental features are enabled for squashing
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx build --squash -t ${{ secrets.DOCKER_USERNAME }}/blackdagger:latest --push .
name: Build and Push Docker Image
on:
create:
tags:
- '*'
jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Clean up directories
run: |
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Clean up Docker
run: |
docker system prune -af
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push Docker Image
env:
DOCKER_BUILDKIT: 1
run: |
docker buildx create --use
# Ensure experimental features are enabled for squashing
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx build --squash -t ${{ secrets.DOCKER_USERNAME }}/blackdagger:latest --push .
85 changes: 85 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CI

on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-*"
pull_request:
types:
- opened
- reopened # new commits are pushed to the branch that the PR is based on
- synchronize # new commits are pushed to the branch that the PR is based on
- ready_for_review # PR is ready for review

jobs:

# # Spell check
# codespell:
# name: Check for spelling errors
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4

# - name: Codespell
# uses: codespell-project/actions-codespell@v2

# Lint Go code
golint:
name: Go Linter
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
args: --timeout=10m

# Test Go code
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: |
make build-bin
- name: Test
run: |
make test-coverage
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
files: ./coverage.txt
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
51 changes: 0 additions & 51 deletions .github/workflows/release-with-tags.yaml

This file was deleted.

33 changes: 16 additions & 17 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
name: Release

on:
push:
create:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-*"

jobs:
# Build release binaries
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21.x

- name: Installing swagger
run: |
go install github.com/go-swagger/go-swagger/cmd/swagger@latest
go-version-file: go.mod

- name: Set up NodeJS
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20

- name: Set up yarn
run: npm install --global yarn

- name: Check out code
uses: actions/checkout@v3

- name: Yarn install
run: yarn install
working-directory: ui
Expand All @@ -38,14 +39,12 @@ jobs:

- name: Copy web assets
run: |
cp ui/dist/*.js ./service/frontend/assets/
cp ui/dist/*.woff ./service/frontend/assets/
cp ui/dist/*.woff2 ./service/frontend/assets/
cp ui/dist/* ./internal/frontend/assets/
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{secrets.BLACKDAGGER_SECRET}}
GITHUB_TOKEN: ${{secrets.BLACKDAGGER_SECRET}}
67 changes: 0 additions & 67 deletions .github/workflows/test.yaml

This file was deleted.

Loading

0 comments on commit 9573f13

Please sign in to comment.