Skip to content

Commit

Permalink
Use specific ubuntu version in GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
pkirilin committed Oct 14, 2024
1 parent 2e49d43 commit 1750638
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

jobs:
backend:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
defaults:
run:
working-directory: 'src/backend'
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Run component tests
run: dotnet test tests/FoodDiary.ComponentTests --no-restore --verbosity normal
frontend:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
defaults:
run:
working-directory: 'src/frontend'
Expand All @@ -51,7 +51,7 @@ jobs:
needs:
- backend
- frontend
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 10
defaults:
run:
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
if: always()
run: docker compose down
run-migrations:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: e2e-tests
if: ${{ github.ref == 'refs/heads/main' }}
steps:
Expand All @@ -96,7 +96,7 @@ jobs:
run: dotnet run --configuration Release --project src/backend/src/FoodDiary.Migrator/FoodDiary.Migrator.csproj "${{ secrets.Migrator_DatabaseConnectionString }}"

build-and-push-image:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: run-migrations
if: ${{ github.ref == 'refs/heads/main' }}
steps:
Expand All @@ -115,7 +115,7 @@ jobs:
docker push cr.yandex/$CR_REGISTRY/$CR_REPOSITORY:$IMAGE_TAG
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: build-and-push-image
if: ${{ github.ref == 'refs/heads/main' }}
steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
run-migrations:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup .NET
Expand All @@ -16,7 +16,7 @@ jobs:
run: dotnet run --configuration Release --project src/backend/src/FoodDiary.Migrator/FoodDiary.Migrator.csproj "${{ secrets.Migrator_DatabaseConnectionString }}"

push-image:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: run-migrations
steps:
- uses: actions/checkout@v4
Expand All @@ -38,7 +38,7 @@ jobs:
file: ./Dockerfile

deploy-yandex-cloud:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: push-image
steps:
- name: Checkout to the branch
Expand All @@ -57,7 +57,7 @@ jobs:
imageToDeploy: index.docker.io/${{ secrets.AzureAppService_ContainerUsername_6ff515138c474569b14fb663d02b6c5d }}/food-diary:${{ github.sha }}

deploy-container-apps:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: push-image
steps:
- name: Checkout to the branch
Expand All @@ -76,7 +76,7 @@ jobs:
imageToDeploy: index.docker.io/${{ secrets.AzureAppService_ContainerUsername_6ff515138c474569b14fb663d02b6c5d }}/food-diary:${{ github.sha }}

deploy-app-service:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: push-image
environment:
name: 'production'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

jobs:
run-migrations:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup .NET
Expand All @@ -21,7 +21,7 @@ jobs:
run: dotnet run --configuration Release --project src/backend/src/FoodDiary.Migrator/FoodDiary.Migrator.csproj "${{ secrets.Migrator_DatabaseConnectionString }}"

build-and-push-image:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: run-migrations
steps:
- name: Checkout to the branch
Expand All @@ -39,7 +39,7 @@ jobs:
docker push cr.yandex/$CR_REGISTRY/$CR_REPOSITORY:$IMAGE_TAG
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: build-and-push-image
steps:
- name: Deploy Serverless Container
Expand Down

0 comments on commit 1750638

Please sign in to comment.