Skip to content

Commit bbea130

Browse files
Merge pull request #1 from codesmithcloud/builder-img
feat!: add first version of the bun-builder image and associated workflows
2 parents d868f92 + c90e0ae commit bbea130

File tree

5 files changed

+120
-0
lines changed

5 files changed

+120
-0
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build, package and push ${{ github.repository }} OCI image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: ${{ github.repository }}
11+
12+
13+
jobs:
14+
build-push:
15+
name: Build and push ${{ github.repository }}
16+
uses: codesmithcloud/ci/.github/workflows/multi-platform-oci-build.yml@main
17+
secrets: inherit
18+
permissions:
19+
contents: read
20+
packages: write
21+
attestations: write
22+
id-token: write
23+
with:
24+
context: ./

.github/workflows/pr.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Pull request quality checks
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
8+
build:
9+
uses: codesmithcloud/ci/.github/workflows/multi-platform-oci-build.yml@main
10+
secrets: inherit
11+
permissions:
12+
contents: read
13+
packages: write
14+
attestations: write
15+
id-token: write
16+
17+
quality:
18+
uses: codesmithcloud/ci/.github/workflows/code-quality.yml@main
19+
secrets: inherit

.github/workflows/release.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Tag and release a new version
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
tag:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
version: ${{ steps.semantic.outputs.version }}
13+
version-tag: ${{ steps.semantic.outputs.version_tag }}
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v5
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Determine version
21+
id: semantic
22+
uses: paulhatch/[email protected]
23+
with:
24+
tag_prefix: v
25+
debug: true
26+
- name: Tag git repo with new version
27+
run: |
28+
git config user.name 'github-actions[bot]'
29+
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
30+
git tag -a "${{ steps.semantic.outputs.version_tag }}" -m "Release ${{ steps.semantic.outputs.version_tag }}"
31+
git push origin tag ${{ steps.semantic.outputs.version_tag }}
32+
33+
deploy:
34+
runs-on: ubuntu-latest
35+
needs:
36+
- tag
37+
38+
permissions:
39+
contents: write
40+
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v5
44+
with:
45+
fetch-depth: 0
46+
47+
- name: Get previous tag
48+
id: previous
49+
run: |
50+
name=$(git --no-pager tag --sort=creatordate --merged refs/tags/${{ needs.tag.outputs.version-tag }} | tail -2 | head -1)
51+
echo "tag=$name" >> $GITHUB_OUTPUT
52+
53+
- name: Update changelog for release
54+
id: changelog
55+
uses: requarks/changelog-action@v1
56+
with:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
fromTag: ${{ steps.previous.outputs.tag }}
59+
toTag: ${{ needs.tag.outputs.version-tag }}
60+
writeToFile: false
61+
62+
- name: Create Release
63+
uses: ncipollo/[email protected]
64+
with:
65+
allowUpdates: false
66+
makeLatest: true
67+
name: ${{ needs.tag.outputs.version-tag }}
68+
body: ${{ steps.changelog.outputs.changes }}
69+
token: ${{ secrets.GITHUB_TOKEN }}
70+
tag: ${{ needs.tag.outputs.version-tag }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.vscode
2+
.idea
3+
.DS_Store

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM docker.io/oven/bun:latest
2+
3+
RUN apt update && \
4+
apt install -y python3

0 commit comments

Comments
 (0)