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