From f304c61ac9c65244a5cd3d6ea4400680f9e1d905 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Tue, 30 Jun 2026 10:45:26 -0500 Subject: [PATCH] chore: update workflows --- .github/workflows/deploy.yml | 41 +++++++++++++++++------------- .github/workflows/pull_request.yml | 10 ++++---- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3ac54c7..443991e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,16 +5,16 @@ on: branches: - main paths-ignore: - - '.github/**' - - '.vscode/**' - - '.gitignore' - - '.editorconfig' - - 'LICENSE.md' - - 'docker-compose.dev.yml' - - 'docker-compose.prod.yml' - - '**/*/README.md' - - '**/*/Dockerfile' - - 'scripts/**' + - ".github/**" + - ".vscode/**" + - ".gitignore" + - ".editorconfig" + - "LICENSE.md" + - "docker-compose.dev.yml" + - "docker-compose.prod.yml" + - "**/*/README.md" + - "**/*/Dockerfile" + - "scripts/**" jobs: build: name: Build and push Docker image @@ -23,30 +23,35 @@ jobs: version: ${{ steps.version.outputs.version }} steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Login to Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Create version tag id: version run: echo "version=$(date +%Y.%m.%d.%H%M%S)" >> $GITHUB_OUTPUT + - name: Set up QEMU + uses: docker/setup-qemu-action@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 - name: Build and push server image - working-directory: src/Blog - run: | - TAG=${{ secrets.DOCKERHUB_USERNAME }}/blog.stevanfreeborn.com:${{ steps.version.outputs.version }} - docker build -t $TAG . - docker push $TAG + uses: docker/build-push-action@v7 + with: + context: src/Blog + platforms: linux/arm64 + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/blog.stevanfreeborn.com:${{ steps.version.outputs.version }} deploy: name: Deploy to server runs-on: ubuntu-latest needs: build steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Copy files to server diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 346ed58..d368cb0 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -20,11 +20,11 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: - dotnet-version: 9.0.x + dotnet-version: 10.0.x - name: Install report generator run: dotnet tool install --global dotnet-reportgenerator-globaltool - name: Restore dependencies @@ -40,13 +40,13 @@ jobs: - name: Test project run: dotnet test -e DOTNET_ENVIRONMENT=CI --no-build --verbosity normal -s ./test/Blog.Tests/ci.runsettings - name: Upload test results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: test-results path: ./test/Blog.Tests/TestResults - name: Upload playwright traces if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: playwright-traces path: ./test/Blog.Tests/bin/Debug/net10.0/playwright-traces