Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorian Eikenberg authored and FlorianHockmann committed Jan 14, 2025
1 parent 8dae51a commit 63cb9c7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Add review to Dependabot PRs
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: "7.0.101"
dotnet-version: "7.0.x"
- name: check format
run: dotnet format --severity error --verify-no-changes ./Motor.NET.sln

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: "7.0.x"
- name: Install dependencies
run: dotnet restore Motor.NET.sln
- name: Build
Expand All @@ -44,14 +44,14 @@ jobs:
- name: Publish Bridge
run: dotnet publish -v minimal -c Release --no-restore -o ./artifacts-bridge ./src/Motor.Extensions.Hosting.Bridge/Motor.Extensions.Hosting.Bridge.csproj
- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: artifacts
path: |
./artifacts/*.nupkg
./artifacts/*.snupkg
- name: Upload Artifact Bridge
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: artifacts-bridge
path: ./artifacts-bridge/*
Expand Down Expand Up @@ -81,13 +81,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: artifacts
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: "7.0.x"
- name: Push to NuGet Feed
run: dotnet nuget push './artifacts/*.nupkg' --skip-duplicate --source $NUGET_FEED --api-key $NUGET_KEY

Expand All @@ -96,7 +96,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v1
id: download
uses: actions/download-artifact@v4
with:
name: artifacts-bridge
- name: Prepare
Expand All @@ -112,20 +113,20 @@ jobs:
VERSION=pr-${{ github.event.number }}
fi
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${VERSION}-${GITHUB_SHA::8}"
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Login to Github Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GitHub Packages
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name == 'release' }}
context: ./artifacts-bridge
context: "${{ steps.download.outputs.download-path }}"
tags: ${{ steps.prep.outputs.tags }}
labels: |
org.opencontainers.image.revision=${{ github.sha }}
Expand Down

0 comments on commit 63cb9c7

Please sign in to comment.