Skip to content

Cache conflicts when running on different architectures #146

Description

@m-kuhn

When running the action in a matrix with x64 and arm64 runners, the cached dependencies are conflicting.

One of the two workflows succeeds, the other one fails with something like this:

Invoke-ArtifactSigning: D:\a\_temp\ace73d1e-2ff7-4e95-b221-c9815111b8d6.ps1:215
Line |
 215 |  Invoke-ArtifactSigning @params
     |  ~~~~~~~~~~~~~~~~~~~~~~
     | The term 'Invoke-ArtifactSigning' is not recognized as a name of a cmdlet, function, script file, or executable
     | program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
     | again.

It would be great if the cache name could be specified in the action configuration or a suffix appended, maybe even architecture specific by default.

For now, we'll deactivate dependency caching as a workaround.

Reproduction (adapted from main readme, not tested exactly like this):

on:
  push:
    branches: [main]

permissions:
  id-token: write
  contents: read

jobs:
  build-and-sign:
    strategy:
      matrix:
        include:
          - os: windows-latest
          - os: windows-11-arm
          - 
    runs-on: ${{ matrix.os }}

    name: Build app and sign files with Artifact Signing
    steps:
      - name: Checkout
        uses: actions/checkout@v5

      - name: Install dependencies
        run: dotnet restore App

      - name: Build
        run: dotnet build --configuration Release --no-restore WpfApp

      - name: Azure login
        uses: azure/login@v3
        with:
          client-id: ${{ secrets.AZURE_CLIENT_ID }}
          tenant-id: ${{ secrets.AZURE_TENANT_ID }}
          subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

      - name: Sign files with Artifact Signing
        uses: azure/artifact-signing-action@v2
        with:
          endpoint: https://eus.codesigning.azure.net/
          signing-account-name: vscx-codesigning
          certificate-profile-name: vscx-certificate-profile
          files-folder: ${{ github.workspace }}\App\App\bin\Release\net8.0-windows
          files-folder-filter: exe,dll
          file-digest: SHA256
          timestamp-rfc3161: http://timestamp.acs.microsoft.com
          timestamp-digest: SHA256

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions