Skip to content

Commit 6791d89

Browse files
project path refactoring (#35)
* project path refactoring * local testing refactoring * rework workflows
1 parent b34c450 commit 6791d89

File tree

223 files changed

+151
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+151
-194
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 15 deletions

.github/workflows/publish-backend.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
fi
3939
4040
- name: Checkout
41-
uses: actions/checkout@master
41+
uses: actions/checkout@v4
4242

4343
- name: Login to Docker Hub
4444
uses: docker/login-action@v2
@@ -56,27 +56,26 @@ jobs:
5656
- name: Set up Docker Buildx
5757
uses: docker/setup-buildx-action@v2
5858

59-
- name: Build and push Backend Multi-Arch
59+
- name: Pick target platforms
6060
run: |
61-
cd backend
62-
docker buildx create --name mybuilder --use --bootstrap || docker buildx use mybuilder
63-
docker buildx inspect mybuilder --bootstrap
64-
docker buildx build \
65-
--platform linux/amd64,linux/arm64 \
66-
--cache-from=type=gha \
67-
--cache-to=type=gha,mode=max \
68-
-t ${{ secrets.DOCKER_LOGIN }}/bugget-api:${{ env.VERSION }} \
69-
--push \
70-
-f ./Bugget/Dockerfile .
71-
7261
if [[ "${{ env.IS_PLAIN_VERSION }}" == "true" ]]; then
73-
docker buildx build \
74-
--platform linux/amd64,linux/arm64 \
75-
--cache-from=type=gha \
76-
--cache-to=type=gha,mode=max \
77-
-t ${{ secrets.DOCKER_LOGIN }}/bugget-api:latest \
78-
--push \
79-
-f ./Bugget/Dockerfile .
62+
# tag == latest → multi-arch
63+
echo "TARGET_PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_ENV
64+
echo "LATEST_TAG=,${{ secrets.DOCKER_LOGIN }}/bugget-api:latest" >> $GITHUB_ENV
8065
else
81-
echo "🔁 Пропущен пуш latest, так как версия не в виде vX.Y.Z"
66+
# не-latest → только amd64
67+
echo "TARGET_PLATFORMS=linux/amd64" >> $GITHUB_ENV
68+
echo "LATEST_TAG=" >> $GITHUB_ENV
8269
fi
70+
71+
- name: Build & push
72+
uses: docker/build-push-action@v5
73+
with:
74+
context: ./backend/bugget-api
75+
file: ./backend/bugget-api/Bugget/Dockerfile
76+
platforms: ${{ env.TARGET_PLATFORMS }}
77+
push: true
78+
tags: |
79+
${{ secrets.DOCKER_LOGIN }}/bugget-api:${{ env.VERSION }}${{ env.LATEST_TAG }}
80+
cache-from: type=gha
81+
cache-to: type=gha,mode=max

.github/workflows/publish-frontend.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,26 @@ jobs:
5656
- name: Set up Docker Buildx
5757
uses: docker/setup-buildx-action@v2
5858

59-
- name: Build and push Frontend Multi-Arch
59+
- name: Pick target platforms
6060
run: |
61-
cd frontend
62-
docker buildx create --name mybuilder --use --bootstrap || docker buildx use mybuilder
63-
docker buildx inspect mybuilder --bootstrap
64-
docker buildx build \
65-
--platform linux/amd64,linux/arm64 \
66-
--cache-from=type=gha \
67-
--cache-to=type=gha,mode=max \
68-
-t ${{ secrets.DOCKER_LOGIN }}/bugget-ui:${{ env.VERSION }} \
69-
--push .
70-
7161
if [[ "${{ env.IS_PLAIN_VERSION }}" == "true" ]]; then
72-
docker buildx build \
73-
--platform linux/amd64,linux/arm64 \
74-
--cache-from=type=gha \
75-
--cache-to=type=gha,mode=max \
76-
-t ${{ secrets.DOCKER_LOGIN }}/bugget-ui:latest \
77-
--push .
62+
# tag == latest → multi-arch
63+
echo "TARGET_PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_ENV
64+
echo "LATEST_TAG=,${{ secrets.DOCKER_LOGIN }}/bugget-ui:latest" >> $GITHUB_ENV
7865
else
79-
echo "🔁 Пропущен пуш latest, так как версия не в виде vX.Y.Z"
66+
# не-latest → только amd64
67+
echo "TARGET_PLATFORMS=linux/amd64" >> $GITHUB_ENV
68+
echo "LATEST_TAG=" >> $GITHUB_ENV
8069
fi
70+
71+
- name: Build & push
72+
uses: docker/build-push-action@v5
73+
with:
74+
context: ./frontend
75+
file: ./frontend/Dockerfile
76+
platforms: ${{ env.TARGET_PLATFORMS }}
77+
push: true
78+
tags: |
79+
${{ secrets.DOCKER_LOGIN }}/bugget-ui:${{ env.VERSION }}${{ env.LATEST_TAG }}
80+
cache-from: type=gha
81+
cache-to: type=gha,mode=max

.github/workflows/publish-migrator.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,26 @@ jobs:
5656
- name: Set up Docker Buildx
5757
uses: docker/setup-buildx-action@v2
5858

59-
- name: Build and push Migrator Multi-Arch
59+
- name: Pick target platforms
6060
run: |
61-
cd devops/migrator
62-
docker buildx create --name mybuilder --use --bootstrap || docker buildx use mybuilder
63-
docker buildx inspect mybuilder --bootstrap
64-
docker buildx build \
65-
--platform linux/amd64,linux/arm64 \
66-
--cache-from=type=gha \
67-
--cache-to=type=gha,mode=max \
68-
-t ${{ secrets.DOCKER_LOGIN }}/bugget-migrator:${{ env.VERSION }} \
69-
--push \
70-
-f ./Dockerfile .
71-
7261
if [[ "${{ env.IS_PLAIN_VERSION }}" == "true" ]]; then
73-
docker buildx build \
74-
--platform linux/amd64,linux/arm64 \
75-
--cache-from=type=gha \
76-
--cache-to=type=gha,mode=max \
77-
-t ${{ secrets.DOCKER_LOGIN }}/bugget-migrator:latest \
78-
--push \
79-
-f ./Dockerfile .
62+
# tag == latest → multi-arch
63+
echo "TARGET_PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_ENV
64+
echo "LATEST_TAG=,${{ secrets.DOCKER_LOGIN }}/bugget-migrator:latest" >> $GITHUB_ENV
8065
else
81-
echo "🔁 Пропущен пуш latest, так как версия не в виде vX.Y.Z"
66+
# не-latest → только amd64
67+
echo "TARGET_PLATFORMS=linux/amd64" >> $GITHUB_ENV
68+
echo "LATEST_TAG=" >> $GITHUB_ENV
8269
fi
70+
71+
- name: Build & push
72+
uses: docker/build-push-action@v5
73+
with:
74+
context: ./
75+
file: ./backend/migrator/Dockerfile
76+
platforms: ${{ env.TARGET_PLATFORMS }}
77+
push: true
78+
tags: |
79+
${{ secrets.DOCKER_LOGIN }}/bugget-migrator:${{ env.VERSION }}${{ env.LATEST_TAG }}
80+
cache-from: type=gha
81+
cache-to: type=gha,mode=max

README.md

Lines changed: 15 additions & 2 deletions
File renamed without changes.
File renamed without changes.

backend/Bugget.BO/Interfaces/IAttachmentKeyGenerator.cs renamed to backend/bugget-api/Bugget.BO/Interfaces/IAttachmentKeyGenerator.cs

File renamed without changes.

0 commit comments

Comments
 (0)