Skip to content

Exclude artifacts when using globbing #150

@obones

Description

@obones

Hello,

I'm using the upload-artifact action to upload only a few selected files as artifacts, by using such a step:

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: com.obones.binding.openmeteo-openhab_${{ matrix.addons-ref }}-java_${{ matrix.java }}
          path: |
            openhab-addons/bundles/com.obones.binding.openmeteo/target/com.obones.binding.openmeteo*.jar
            !openhab-addons/bundles/com.obones.binding.openmeteo/target/com.obones.binding.openmeteo*-sources.jar

This allows to upload com.obones.binding.openmeteo-0.1.0.jar but not com.obones.binding.openmeteo-0.1.0-sources.jar as it is of no use in my case.

I tried using the same glob patterns on the attest-build-provenance step like this:

      - name: Create attestation
        uses: actions/attest-build-provenance@v1
        with:
          subject-path: |
            openhab-addons/bundles/com.obones.binding.openmeteo/target/com.obones.binding.openmeteo*.jar
            !openhab-addons/bundles/com.obones.binding.openmeteo/target/com.obones.binding.openmeteo*-sources.jar

But it still creates two attestations as can be seen here

Did I miss something?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions