Skip to content

Commit

Permalink
test docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
msm1984 committed Aug 18, 2024
1 parent f93c323 commit c064752
Show file tree
Hide file tree
Showing 91 changed files with 5,063 additions and 4,984 deletions.
102 changes: 51 additions & 51 deletions .github/workflows/CD_Backend.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
name: CD_Backend

permissions:
contents: write

on:
push:
branches:
- dev

jobs:
version-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: login to docker registry
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}

- name: build and push docker image to registry
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: mohammadsadeghmontazeri/starback:latest

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
body: |
steps.tag_version.outputs.changelog
draft: false
prerelease: false
name: CD_Backend

permissions:
contents: write

on:
push:
branches:
- dev

jobs:
version-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: login to docker registry
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}

- name: build and push docker image to registry
uses: docker/build-push-action@v5
with:
context: backend.Dockerfile
push: true
tags: mohammadsadeghmontazeri/starback:latest

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
body: |
steps.tag_version.outputs.changelog
draft: false
prerelease: false
56 changes: 28 additions & 28 deletions .github/workflows/CI_Backend.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: CI_Backend

on:
pull_request:
branches:
- dev

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"

- name: Restore dependencies
run: dotnet restore

- name: Build project
run: dotnet build --configuration Release --no-restore

- name: Run tests
run: dotnet test --no-build --verbosity normal
name: CI_Backend

on:
pull_request:
branches:
- dev

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"

- name: Restore dependencies
run: dotnet restore

- name: Build project
run: dotnet build --configuration Release --no-restore

- name: Run tests
run: dotnet test --no-build --verbosity normal
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: test

permissions:
contents: write

on:
push:
branches:
- fixcompose

jobs:
version-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: login to docker registry
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}

- name: build and push docker image to registry
uses: docker/build-push-action@v5
with:
context: migrate.Dockerfile
push: true
tags: mohammadsadeghmontazeri/migratestar:latest
Loading

0 comments on commit c064752

Please sign in to comment.