Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #62

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

Dev #62

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ POSTGRES_DB=stacker
POSTGRES_PORT=5432
SECURITY_KEY=SECURITY_KEY_SHOULD_BE_OF_LEN_32

REDIS_URL=redis://127.0.0.1/
REDIS_URL=redis://127.0.0.1/
SQLX_OFFLINE=true
49 changes: 34 additions & 15 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ name: Docker CICD
on:
push:
branches:
- master
- main
- testing
pull_request:
branches:
- master
- main

env:
SQLX_OFFLINE: true

jobs:
cicd-linux-docker:

cicd-docker:
name: Cargo and npm build
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -61,6 +65,12 @@ jobs:
with:
command: check

- name: Run cargo sqlx prepare
uses: actions-rs/cargo@v1
with:
command: sqlx prepare
args: --release

- name: Cargo test
if: ${{ always() }}
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -101,7 +111,7 @@ jobs:
# npm test

- name: Archive production artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: dist-without-markdown
path: |
Expand All @@ -123,18 +133,18 @@ jobs:
cd ..

- name: Upload app archive for Docker job
uses: actions/upload-artifact@v2.2.2
uses: actions/upload-artifact@v4
with:
name: artifact-linux-docker
path: app.tar.gz

cicd-docker:
cicd-linux-docker:
name: CICD Docker
runs-on: ubuntu-latest
needs: cicd-linux-docker
needs: cicd-docker
steps:
- name: Download app archive
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: artifact-linux-docker

Expand All @@ -144,12 +154,21 @@ jobs:
- name: Display structure of downloaded files
run: ls -R

- name: Docker build and publish
uses: docker/build-push-action@v1
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: trydirect/stacker
add_git_labels: true
tag_with_ref: true
#no-cache: true
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: trydirect/stacker:latest
3 changes: 2 additions & 1 deletion .github/workflows/notifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ jobs:

notifyTelegram:
runs-on: ubuntu-latest
concurrency: build
steps:
- name: send custom message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
"Issue ${{ github.event.action }}: \n${{ github.event.issue.html_url }}"
"Github actions on push: build in progress .. ${{ github.event.action }} "
15 changes: 8 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@ name: Rust

on:
push:
branches: [ "main" ]
branches: [ dev, main ]
pull_request:
branches: [ "main" ]
branches: [ dev, main ]

env:
CARGO_TERM_COLOR: always
SQLX_OFFLINE: true

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build
- uses: actions/checkout@v4
- name: cargo sqlx prepare
run: cargo sqlx prepare
- name: cargo build
run: cargo build --verbose
- name: Run tests
- name: cargo test
run: cargo test --verbose

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading