Skip to content

Commit

Permalink
Update GitHub actions and configure Dependabot to keep actions up to …
Browse files Browse the repository at this point in the history
…date (#433)
  • Loading branch information
adamreeve authored Mar 26, 2024
1 parent c98ee2b commit 3c898f2
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 29 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
40 changes: 20 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK v7.0.x
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Code formating check
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Compute vcpkg triplet and root
- name: Compute vcpkg triplet and root
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
# Check for cached vcpkg dependencies (use these if we can).
- name: Get cached vcpkg dependencies
id: get-cached-vcpkg
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: cache/vcpkg
# https://vcpkg.readthedocs.io/en/stable/users/binarycaching/
Expand Down Expand Up @@ -148,12 +148,12 @@ jobs:

# .NET Core Setup (and also MSBuild for Windows).
- name: Setup .NET SDK v7.0.x
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Setup MSBuild
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v1
uses: microsoft/setup-msbuild@v2

# Compile ParquetSharp and C++ dependencies (and upload the native library as an artifact).
- name: Compile native ParquetSharp library (Unix)
Expand All @@ -172,7 +172,7 @@ jobs:
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/cache/vcpkg,readwrite
- name: Upload vcpkg arrow logs
if: steps.get-cached-vcpkg.outputs.cache-hit != 'true' && (success() || failure())
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.vcpkg-info.outputs.triplet }}-vcpkg-arrow-logs
path: ${{ steps.vcpkg-info.outputs.root }}/buildtrees/arrow/*.log
Expand All @@ -188,7 +188,7 @@ jobs:
dotnet build csharp.test --configuration=Release -p:OSArchitecture=${{ matrix.arch }}
dotnet build fsharp.test --configuration=Release -p:OSArchitecture=${{ matrix.arch }}
- name: Upload native ParquetSharp library
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.vcpkg-info.outputs.triplet }}-native-library
path: bin
Expand All @@ -205,23 +205,23 @@ jobs:
needs: build-native
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Copy native ParquetSharp libraries
run: |
mkdir bin
cp -rv artifacts/*-native-library/* bin/
- name: Setup .NET SDK v7.0.x
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Build NuGet package
run: dotnet build csharp --configuration=Release
- name: Upload NuGet artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: nuget
Expand All @@ -244,28 +244,28 @@ jobs:
needs: build-nuget
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get version
id: get-version
run: echo "version=$((Select-Xml -Path ./csharp/ParquetSharp.csproj -XPath '/Project/PropertyGroup/Version/text()').node.Value)" >> $env:GITHUB_OUTPUT
shell: pwsh
- name: Download NuGet artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: nuget-package
path: nuget
- name: Setup .NET Core SDK v3.1.x
if: matrix.dotnet == 'netcoreapp3.1'
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.x
- name: Setup .NET SDK v6.0.x
if: matrix.dotnet == 'net6.0'
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Setup .NET SDK v7.0.x
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Add local NuGet feed
Expand Down Expand Up @@ -305,7 +305,7 @@ jobs:
needs: all-required-checks-done
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check version
id: check-version
shell: pwsh
Expand All @@ -318,18 +318,18 @@ jobs:
}
echo "version=$version" >> $env:GITHUB_OUTPUT
- name: Download NuGet artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: nuget-package
path: nuget
- name: Setup .NET SDK v7.0.x
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
# if version contains "-" treat it as pre-release
# example: 1.0.0-beta1
- name: Create release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
name: ParquetSharp ${{ steps.check-version.outputs.version }}
draft: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
# Check for cached vcpkg dependencies (use these if we can).
- name: Get cached vcpkg dependencies
id: get-cached-vcpkg
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: cache/vcpkg
key: vcpkg-${{ steps.vcpkg-info.outputs.triplet }}-cmake:${{ steps.cmake-info.outputs.version }}-vcpkg_json:${{ hashFiles('vcpkg*.json') }}-runner:${{ steps.runner-info.outputs.info }}
Expand All @@ -74,7 +74,7 @@ jobs:
git pull
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: cpp, csharp

Expand All @@ -86,4 +86,4 @@ jobs:
dotnet build csharp --configuration=Release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
12 changes: 6 additions & 6 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
runs-on: ${{ matrix.runner }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Compute image info
id: image
run: |
echo "name=ghcr.io/$(echo ${{ github.repository }} | tr A-Z a-z)/devcontainer" >> "$GITHUB_OUTPUT"
echo "push=${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule' }}" >> "$GITHUB_OUTPUT"
- name: Compute image labels
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ steps.image.outputs.name }}
tags: latest
Expand All @@ -59,7 +59,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image${{ fromJson(steps.image.outputs.push) && ' and push it by digest' || ''}}
id: build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: .devcontainer/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -74,7 +74,7 @@ jobs:
touch "/tmp/digests/${digest#sha256:}"
- if: fromJson(steps.image.outputs.push)
name: Upload digest
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: digests
path: /tmp/digests/*
Expand All @@ -92,12 +92,12 @@ jobs:
- build
steps:
- name: Download digests
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: digests
path: /tmp/digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
Expand Down

0 comments on commit 3c898f2

Please sign in to comment.