mirror of
https://github.com/pesde-pkg/pesde.git
synced 2025-05-04 10:33:47 +01:00
ci: filter out artifacts
This commit is contained in:
parent
ce98553a5b
commit
524238b559
1 changed files with 12 additions and 12 deletions
24
.github/workflows/release.yaml
vendored
24
.github/workflows/release.yaml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
|||
id: extract_version
|
||||
with:
|
||||
file: "./Cargo.toml"
|
||||
field: "package.version"
|
||||
field: "package.version"
|
||||
|
||||
- name: Extract registry version
|
||||
uses: SebRollen/toml-action@v1.0.2
|
||||
|
@ -47,11 +47,11 @@ jobs:
|
|||
registry: ghcr.io
|
||||
repository: "${{ steps.repository_owner.outputs.lowercase }}/registry"
|
||||
tag: ${{ steps.extract_registry_version.outputs.value }}
|
||||
|
||||
|
||||
- name: Ensure not published
|
||||
id: ensure_not_published
|
||||
shell: bash
|
||||
run: |
|
||||
run: |
|
||||
CRATE_NAME="${{ env.CRATE_NAME }}"
|
||||
if [ ${#CRATE_NAME} -eq 1 ]; then
|
||||
DIR="1"
|
||||
|
@ -96,7 +96,7 @@ jobs:
|
|||
target: aarch64-apple-darwin
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Build for ${{ matrix.host }}-${{ matrix.arch }}
|
||||
needs: [ prepare ]
|
||||
needs: [prepare]
|
||||
if: ${{ needs.prepare.outputs.found == 'false' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -137,7 +137,7 @@ jobs:
|
|||
publish:
|
||||
name: Publish to crates.io
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build ]
|
||||
needs: [build]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
@ -150,7 +150,7 @@ jobs:
|
|||
permissions:
|
||||
contents: write
|
||||
pull-requests: read
|
||||
needs: [ prepare, publish ]
|
||||
needs: [prepare, publish]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
@ -159,6 +159,7 @@ jobs:
|
|||
with:
|
||||
path: artifacts
|
||||
merge-multiple: true
|
||||
pattern: "*.zip"
|
||||
|
||||
- name: Check if CLI version is pre-release
|
||||
id: is_prerelease
|
||||
|
@ -183,7 +184,7 @@ jobs:
|
|||
|
||||
build-registry-image:
|
||||
name: Build Docker image
|
||||
needs: [ prepare ]
|
||||
needs: [prepare]
|
||||
if: ${{ needs.prepare.outputs.registry_published == 'not found' }}
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -193,7 +194,7 @@ jobs:
|
|||
include:
|
||||
- os: ubuntu-latest
|
||||
platform: linux/amd64
|
||||
|
||||
|
||||
- os: ubuntu-24.04-arm
|
||||
platform: linux/arm64
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
@ -224,7 +225,7 @@ jobs:
|
|||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
|
||||
- name: Build and push Docker image
|
||||
id: build
|
||||
uses: docker/build-push-action@v6
|
||||
|
@ -247,11 +248,11 @@ jobs:
|
|||
path: ${{ runner.temp }}/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
|
||||
publish-registry-image:
|
||||
name: Publish Docker image
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ prepare, build-registry-image ]
|
||||
needs: [prepare, build-registry-image]
|
||||
steps:
|
||||
- name: Download digests
|
||||
uses: actions/download-artifact@v4
|
||||
|
@ -294,4 +295,3 @@ jobs:
|
|||
- name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ needs.prepare.outputs.registry_image }}:${{ needs.prepare.outputs.registry_version }}
|
||||
|
Loading…
Add table
Reference in a new issue