Skip to content

Commit

Permalink
Update GHA versions (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
brantburnett authored May 29, 2024
1 parent 4748c7b commit 23681d1
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 18 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
# 6.0 needed for GitVersion
dotnet-version: |
6.0.x
8.0.x
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.15
uses: gittools/actions/gitversion/setup@v1
with:
versionSpec: "5.10.3"
versionSpec: "5.12.0"
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.15
uses: gittools/actions/gitversion/execute@v1
with:
useConfigFile: true
configFilePath: "GitVersion.yml"

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
Expand Down Expand Up @@ -83,17 +83,23 @@ jobs:
needs: build

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
# 6.0 needed for GitVersion
dotnet-version: |
6.0.x
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.13
uses: gittools/actions/gitversion/setup@v1
with:
versionSpec: "5.10.3"
versionSpec: "5.12.0"
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.13
uses: gittools/actions/gitversion/execute@v1
with:
useConfigFile: true
configFilePath: "GitVersion.yml"
Expand All @@ -110,16 +116,16 @@ jobs:
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v3
- uses: docker/build-push-action@v5
with:
context: .
build-args: VERSION=${{ steps.gitversion.outputs.nuGetVersionV2 }}
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/cleanup-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,39 @@ jobs:
packages: write

steps:
- uses: actions/delete-package-versions@v3
- uses: actions/delete-package-versions@v5
with:
package-name: Yardarm
package-type: nuget
min-versions-to-keep: 30
ignore-versions: ^(?!.*ci-pr).*$
- uses: actions/delete-package-versions@v3
- uses: actions/delete-package-versions@v5
with:
package-name: Yardarm.NewtonsoftJson
package-type: nuget
min-versions-to-keep: 30
ignore-versions: ^(?!.*ci-pr).*$
- uses: actions/delete-package-versions@v3
- uses: actions/delete-package-versions@v5
with:
package-name: Yardarm.SystemTextJson
package-type: nuget
min-versions-to-keep: 30
ignore-versions: ^(?!.*ci-pr).*$
- uses: actions/delete-package-versions@v3
- uses: actions/delete-package-versions@v5
with:
package-name: Yardarm.MicrosoftExtensionsHttp
package-type: nuget
min-versions-to-keep: 30
ignore-versions: ^(?!.*ci-pr).*$
- uses: actions/delete-package-versions@v5
with:
package-name: Yardarm.CommandLine
package-type: nuget
min-versions-to-keep: 30
ignore-versions: ^(?!.*ci-pr).*$
- uses: actions/delete-package-versions@v3
- uses: actions/delete-package-versions@v5
with:
package-name: Yardarm.Sdk
package-type: nuget
min-versions-to-keep: 30
ignore-versions: ^(?!.*ci-pr).*$
5 changes: 5 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ branches:
mode: ContinuousDeployment
tag: ci-pr-
track-merge-target: true
tags:
regex: tags/(?<tag>.+)
tag: ''
source-branches:
- main
ignore:
sha: []
merge-message-formats: {}
Expand Down

0 comments on commit 23681d1

Please sign in to comment.