mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-12 09:10:32 +00:00
feat: add binary + sha256 to GitHub Release artifacts
This commit is contained in:
40
.github/workflows/release.yml
vendored
40
.github/workflows/release.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Rust
|
- name: Set up Rust
|
||||||
run: |
|
run: |
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
type=raw,value=latest
|
type=raw,value=latest
|
||||||
|
|
||||||
- name: Build and push (alpine)
|
- name: Build and push (alpine)
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
type=raw,value=redos
|
type=raw,value=redos
|
||||||
|
|
||||||
- name: Build and push (redos)
|
- name: Build and push (redos)
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: Dockerfile.redos
|
file: Dockerfile.redos
|
||||||
@@ -120,7 +120,7 @@ jobs:
|
|||||||
# ── CVE scan of the pushed image ────────────────────────────────────────
|
# ── CVE scan of the pushed image ────────────────────────────────────────
|
||||||
# Images are FROM scratch — no OS packages, only binary CVE scan
|
# Images are FROM scratch — no OS packages, only binary CVE scan
|
||||||
- name: Trivy — image scan (${{ matrix.name }})
|
- name: Trivy — image scan (${{ matrix.name }})
|
||||||
uses: aquasecurity/trivy-action@0.34.1
|
uses: aquasecurity/trivy-action@0.30.0
|
||||||
with:
|
with:
|
||||||
scan-type: image
|
scan-type: image
|
||||||
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.ver.outputs.tag }}${{ matrix.suffix }}
|
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.ver.outputs.tag }}${{ matrix.suffix }}
|
||||||
@@ -145,7 +145,7 @@ jobs:
|
|||||||
packages: read # to pull image for SBOM generation
|
packages: read # to pull image for SBOM generation
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Log in to Container Registry
|
- name: Log in to Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@@ -158,6 +158,18 @@ jobs:
|
|||||||
id: ver
|
id: ver
|
||||||
run: echo "tag=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
|
run: echo "tag=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# ── Binary — extract from Docker image ──────────────────────────────────
|
||||||
|
- name: Extract binary from image
|
||||||
|
run: |
|
||||||
|
docker create --name nora-extract \
|
||||||
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.ver.outputs.tag }}
|
||||||
|
docker cp nora-extract:/nora ./nora-linux-amd64
|
||||||
|
docker rm nora-extract
|
||||||
|
chmod +x ./nora-linux-amd64
|
||||||
|
sha256sum ./nora-linux-amd64 > nora-linux-amd64.sha256
|
||||||
|
echo "Binary size: $(du -sh nora-linux-amd64 | cut -f1)"
|
||||||
|
cat nora-linux-amd64.sha256
|
||||||
|
|
||||||
# ── SBOM — Software Bill of Materials ───────────────────────────────────
|
# ── SBOM — Software Bill of Materials ───────────────────────────────────
|
||||||
- name: Generate SBOM (SPDX)
|
- name: Generate SBOM (SPDX)
|
||||||
uses: anchore/sbom-action@v0
|
uses: anchore/sbom-action@v0
|
||||||
@@ -178,13 +190,29 @@ jobs:
|
|||||||
registry-password: ${{ secrets.GITHUB_TOKEN }}
|
registry-password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
files: |
|
files: |
|
||||||
|
nora-linux-amd64
|
||||||
|
nora-linux-amd64.sha256
|
||||||
nora-${{ github.ref_name }}.sbom.spdx.json
|
nora-${{ github.ref_name }}.sbom.spdx.json
|
||||||
nora-${{ github.ref_name }}.sbom.cdx.json
|
nora-${{ github.ref_name }}.sbom.cdx.json
|
||||||
body: |
|
body: |
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -fsSL https://getnora.io/install.sh | sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Or download the binary directly:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -LO https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/nora-linux-amd64
|
||||||
|
chmod +x nora-linux-amd64
|
||||||
|
sudo mv nora-linux-amd64 /usr/local/bin/nora
|
||||||
|
```
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
**Alpine (standard):**
|
**Alpine (standard):**
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ members = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.2.22"
|
version = "0.2.23"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
authors = ["DevITWay <devitway@gmail.com>"]
|
authors = ["DevITWay <devitway@gmail.com>"]
|
||||||
|
|||||||
Reference in New Issue
Block a user