Skip to content

Commit fa3ed42

Browse files
committed
Add Syft installation and SBOM generation to Docker workflow; update README for version 5.4.7
1 parent c22f9da commit fa3ed42

2 files changed

Lines changed: 45 additions & 15 deletions

File tree

.github/workflows/dockerimage.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ jobs:
3737
echo "full_version=$FULL_VERSION" >> $GITHUB_OUTPUT
3838
echo "major_version=$MAJOR_VERSION" >> $GITHUB_OUTPUT
3939
echo "major_minor_version=$MAJOR_MINOR_VERSION" >> $GITHUB_OUTPUT
40+
41+
- name: Install Syft for SBOM generation
42+
run: |
43+
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
4044
4145
- name: Build and push
4246
uses: docker/build-push-action@v4
@@ -49,7 +53,29 @@ jobs:
4953
evandarwin/lua:${{ steps.version.outputs.major_version }}
5054
evandarwin/lua:latest
5155
provenance: true
56+
outputs: type=image,name=evandarwin/lua
5257
build-args: |
5358
BUILD_DATE=${{ github.event.repository.updated_at }}
5459
VCS_REF=${{ github.sha }}
5560
VERSION=${{ steps.version.outputs.full_version }}
61+
62+
- name: Generate SBOM
63+
if: github.event_name != 'pull_request'
64+
run: |
65+
# Create output directory
66+
mkdir -p sbom
67+
68+
# Generate SBOM in multiple formats
69+
syft evandarwin/lua:${{ steps.version.outputs.full_version }} -o spdx-json=sbom/spdx.json
70+
syft evandarwin/lua:${{ steps.version.outputs.full_version }} -o cyclonedx-json=sbom/cyclonedx.json
71+
72+
# Optional: Generate human-readable text version
73+
syft evandarwin/lua:${{ steps.version.outputs.full_version }} -o text=sbom/sbom.txt
74+
75+
- name: Upload SBOM as artifact
76+
if: github.event_name != 'pull_request'
77+
uses: actions/upload-artifact@v3
78+
with:
79+
name: sbom-files
80+
path: sbom/
81+
retention-days: 7

README.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,22 @@ A simple `alpine` docker image that includes the Lua runtime as well as [LuaRock
66

77
## Features
88

9-
- Lua 5.4.6 runtime
9+
- Lua 5.4.7 runtime
1010
- LuaRocks 3.9.2 package manager
1111
- Based on Alpine Linux for a minimal footprint
1212
- Container attestation and SBOM support
1313

14+
## Available Tags
15+
16+
Several version tags are available for flexibility:
17+
18+
- `evandarwin/lua:5.4.7` - Specific version (e.g., 5.4.7)
19+
- `evandarwin/lua:5.4` - Major.Minor version (e.g., 5.4)
20+
- `evandarwin/lua:5` - Major version only (e.g., 5)
21+
- `evandarwin/lua:latest` - Latest stable release
22+
23+
We recommend using the specific version tag for production environments to ensure stability, while the less specific tags can be used for development or when you want to automatically get updates.
24+
1425
## Docker Image Security
1526

1627
This image includes supply chain security features:
@@ -20,25 +31,18 @@ This image includes supply chain security features:
2031
The image build process includes:
2132
- Docker provenance attestation
2233
- Software Bill of Materials (SBOM)
23-
- Container signing with Cosign
24-
25-
### Verification
2634

27-
You can verify the image attestations using [Cosign](https://github.com/sigstore/cosign):
35+
## Usage
2836

2937
```bash
30-
# Verify the signature
31-
cosign verify ghcr.io/evandarwin/lua:5.4.6
38+
# Pull a specific version
39+
docker pull evandarwin/lua:5.4.7
3240

33-
# Download and view the SBOM
34-
cosign download sbom ghcr.io/evandarwin/lua:5.4.6 > sbom.spdx.json
35-
```
41+
# Or use the major.minor version
42+
docker pull evandarwin/lua:5.4
3643

37-
## Usage
38-
39-
```bash
40-
docker pull evandarwin/lua:5.4.6
41-
docker run -it evandarwin/lua:5.4.6 lua -e "print('Hello from Lua!')"
44+
# Run a Lua command
45+
docker run -it evandarwin/lua:5.4.7 lua -e "print('Hello from Lua!')"
4246
```
4347

4448
Have fun!

0 commit comments

Comments
 (0)