fix(pub-con): Check if tar or zip to allow apptainers
This commit is contained in:
@@ -62,19 +62,23 @@ runs:
|
|||||||
skopeo login \
|
skopeo login \
|
||||||
--username "${{ github.actor }}" \
|
--username "${{ github.actor }}" \
|
||||||
--password "${{ inputs.container-token }}" \
|
--password "${{ inputs.container-token }}" \
|
||||||
"${{ vars.REGISTRY }}"
|
"${{ inputs.REGISTRY }}"
|
||||||
|
|
||||||
# Build container
|
# Build container
|
||||||
nix-build -A containers."${{ inputs.project }}" \
|
nix-build -A containers."${{ inputs.project }}" \
|
||||||
--argstr env "${{ steps.envvars.outputs.ENV }}"
|
--argstr env "${{ steps.envvars.outputs.ENV }}"
|
||||||
|
|
||||||
# The Nix build creates a compressed tar.gz file, we need to extract it first
|
# The Nix build creates a compressed tar.gz file, we need to extract it first
|
||||||
|
IMAGE_TAR="$(readlink -f result)"
|
||||||
cd /tmp/skopeo
|
cd /tmp/skopeo
|
||||||
cp ${GITHUB_WORKSPACE}/result ./docker-image.tar.gz
|
if file "${IMAGE_TAR}" | grep -qi gzip; then
|
||||||
gunzip docker-image.tar.gz
|
echo "Detected gzip-compressed image"
|
||||||
|
cp "${IMAGE_TAR}" docker-image.tar.gz
|
||||||
# ls -alh ./result
|
gunzip docker-image.tar.gz
|
||||||
# skopeo inspect docker-archive://$(readlink -f ./result)
|
else
|
||||||
|
echo "Detected uncompressed image"
|
||||||
|
cp "${IMAGE_TAR}" docker-image.tar
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Pushing image: ${{ steps.envvars.outputs.IMAGE_NAME }}"
|
echo "Pushing image: ${{ steps.envvars.outputs.IMAGE_NAME }}"
|
||||||
skopeo copy \
|
skopeo copy \
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ name: "publish-nuget"
|
|||||||
description: "Publishes a NuGet package to a Gitea-hosted NuGet registry and attests to its contents."
|
description: "Publishes a NuGet package to a Gitea-hosted NuGet registry and attests to its contents."
|
||||||
inputs:
|
inputs:
|
||||||
package-path:
|
package-path:
|
||||||
description: "Path to the package directory relative to src/, e.g. Oceanbox.FvcomKit"
|
description: "Path to the package directory to the root of the repo, e.g. src/Oceanbox.FvcomKit"
|
||||||
|
required: true
|
||||||
|
package-name:
|
||||||
|
description: "Name of the package e.g. Oceanbox.FvcomKit"
|
||||||
required: true
|
required: true
|
||||||
nuget-key:
|
nuget-key:
|
||||||
description: "API key with which to authenticate to the NuGet registry."
|
description: "API key with which to authenticate to the NuGet registry."
|
||||||
@@ -53,25 +56,25 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
nix-shell --run "set -o pipefail; set -o nounset; set -o errexit;
|
nix-shell --run "set -o pipefail; set -o nounset; set -o errexit;
|
||||||
dotnet restore src/${{ inputs.package-path }} ${{ inputs.dotnet-restore-args }}"
|
dotnet restore ${{ inputs.package-path }} ${{ inputs.dotnet-restore-args }}"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
nix-shell --run "set -o pipefail; set -o nounset; set -o errexit;
|
nix-shell --run "set -o pipefail; set -o nounset; set -o errexit;
|
||||||
dotnet build --no-restore --configuration ${{ inputs.configuration }} src/${{ inputs.package-path }} ${{ inputs.dotnet-build-args }}"
|
dotnet build --no-restore --configuration ${{ inputs.configuration }} ${{ inputs.package-path }} ${{ inputs.dotnet-build-args }}"
|
||||||
|
|
||||||
- name: Pack
|
- name: Pack
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
nix-shell --run "set -o pipefail; set -o nounset; set -o errexit;
|
nix-shell --run "set -o pipefail; set -o nounset; set -o errexit;
|
||||||
dotnet pack src/${{ inputs.package-path }} --no-restore ${{ inputs.dotnet-pack-args }} --configuration ${{ inputs.configuration }} -o ${{ inputs.nupkg-dir }}"
|
dotnet pack ${{ inputs.package-path }} --no-restore ${{ inputs.dotnet-pack-args }} --configuration ${{ inputs.configuration }} -o ${{ inputs.nupkg-dir }}"
|
||||||
|
|
||||||
- name: Publish NuGet package
|
- name: Publish NuGet package
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
nix-shell --run "set -o pipefail; set -o nounset; set -o errexit;
|
nix-shell --run "set -o pipefail; set -o nounset; set -o errexit;
|
||||||
dotnet nuget push ${{ inputs.nupkg-dir }}/${{ inputs.package-path }}.*.nupkg --api-key ${{ inputs.nuget-key }} --source '${{ inputs.source-name }}' --skip-duplicate"
|
dotnet nuget push ${{ inputs.nupkg-dir }}/${{ inputs.package-name }}.*.nupkg --api-key ${{ inputs.nuget-key }} --source '${{ inputs.source-name }}' --skip-duplicate"
|
||||||
|
|
||||||
# TODO: Add attestation
|
# TODO: Add attestation
|
||||||
# - name: Attest Build Provenance
|
# - name: Attest Build Provenance
|
||||||
|
|||||||
+1
-1
@@ -83,7 +83,7 @@ runs:
|
|||||||
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}",
|
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}",
|
||||||
"assets": [
|
"assets": [
|
||||||
"RELEASE_NOTES.md",
|
"RELEASE_NOTES.md",
|
||||||
".version",
|
"VERSION",
|
||||||
"src/*.fsproj",
|
"src/*.fsproj",
|
||||||
"src/*/**.fsproj"
|
"src/*/**.fsproj"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user