Skip to content

Commit

Permalink
Fix CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
kaevdokimov committed Dec 7, 2024
1 parent 33eff17 commit 8791501
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,25 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.20 # Укажите нужную версию Go
go-version: 1.23 # Укажите нужную версию Go

# Установка зависимостей
- name: Install dependencies
run: go mod tidy
run: go mod download

# Сборка приложения
- name: Build application
run: go build -ldflags='-s -w -extldflags "-static"' -o ./bot

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bot
path: bot

# Запуск тестов
- name: Run tests
run: go test ./... -v
# - name: Run tests
# run: go test ./... -v

docker-build:
name: Build and Push Docker Image
Expand All @@ -40,6 +50,12 @@ jobs:
# Проверка репозитория
- name: Checkout code
uses: actions/checkout@v3

# Скачивание артифакта
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: bot

# Логин в Docker Hub
- name: Log in to Docker Hub
Expand Down

0 comments on commit 8791501

Please sign in to comment.