Skip to content

Commit

Permalink
init: studio cli with apk and nix packages + release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tulilirockz committed Mar 21, 2024
0 parents commit 54ab8a6
Show file tree
Hide file tree
Showing 37 changed files with 2,139 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.yml linguist-detectable=true
*.yml linguist-language=YAML

*.yaml linguist-detectable=true
*.yaml linguist-language=YAML

*.just linguist-detectable=true
*.just linguist-documentation=false
*.just linguist-language=Just

*.json linguist-detectable=true
*.json linguist-documentation=false
*.json linguist-language=JSON
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @tulilirockz
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug Report
description: Report an issue about using Atomic Studio
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this bug report!
- type: textarea
id: describe-bug
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
placeholder: Tell us what happened!
value: "When I entered 2 + 2, I got the answer 6."
validations:
required: true
- type: textarea
id: expected-bahavior
attributes:
label: What did you expect to happen?
description: A clear description of what you expected to happen.
placeholder: What were you expecting to happen?
value: "I expected 2 + 2 to equal 4, but instead 2 + 2 equaled 6!"
validations:
required: true
- type: textarea
id: version
attributes:
label: Output of `studio reporter -m loopback`
description: Please run `studio reporter -m loopback` and paste here.
render: shell
- type: textarea
id: extra-context
attributes:
label: Extra information or context
description: Add any other context about the problem here.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Request a Package
description: Request a package or feature to be included in an image
labels: [package-request]

body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this request!
- type: textarea
id: describe-bug
attributes:
label: Describe the package
description: Include why you feel this should be on the image
placeholder: Tell us what you need
value: "I'd like to request the package `vim` because ..."
validations:
required: true
- type: dropdown
id: image
attributes:
label: Image
description: Which specific image do you want?
options:
- CudaBox
- MayaBox
- Other distrobox
validations:
required: true
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
3 changes: 3 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
enabled: true
titleOnly: true
28 changes: 28 additions & 0 deletions .github/workflows/apk-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build APK package

on:
push:
branches:
- "main"

jobs:
build-apk:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Signing key
run: |
echo "$APK_SIGNING_SECRET" >> /tmp/signing-secret.priv
env:
APK_SIGNING_SECRET: ${{secrets.APK_SIGNING_SECRET}}
- name: Install Melange
run: /home/linuxbrew/.linuxbrew/bin/brew install melange
- name: Build package
run: /home/linuxbrew/.linuxbrew/bin/melange build --signing-key=/tmp/signing-secret.priv --runner=docker melange.yaml
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: studio-cli-packages
path: ./packages

15 changes: 15 additions & 0 deletions .github/workflows/flake-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Commit Check
on:
push:
pull_request:
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- run: nix flake check -L
19 changes: 19 additions & 0 deletions .github/workflows/flakehub-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Publish every Git push to main to FlakeHub"
on:
push:
branches:
- "main"
jobs:
flakehub-publish:
runs-on: "ubuntu-latest"
permissions:
id-token: "write"
contents: "read"
steps:
- uses: "actions/checkout@v3"
- uses: "DeterminateSystems/nix-installer-action@main"
- uses: "DeterminateSystems/flakehub-push@main"
with:
name: "atomic-studio-org/cli"
rolling: true
visibility: "public"
25 changes: 25 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
on:
push:
branches:
- main
permissions:
contents: write
checks: write
actions: read
packages: write
pull-requests: write
name: Release Please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release-please.outputs.releases_created }}
tag: ${{ steps.release-please.outputs.tag_name }}
upload_url: ${{ steps.release-please.outputs.upload_url }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release-please
with:
release-type: simple
package-name: release-please-action
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.direnv/
/packages/
/result*
*.key
*.rsa
35 changes: 35 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
VERSION 0.8
PROJECT atomic-studio-org/cli

studio-cli:
FROM registry.fedoraproject.org/fedora-toolbox

RUN dnf -y install dnf-plugins-core \
&& dnf install --refresh -y \
jq \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-plugin \
buildah \
podman \
skopeo \
distrobox

COPY +cosign/cosign /usr/bin/cosign

COPY (+install/bluebuild --BUILD_TARGET="x86_64-unknown-linux-gnu" --NIGHTLY=$NIGHTLY) /usr/bin/bluebuild

ARG TAG
ARG LATEST=false

RUN mkdir -p /bluebuild
WORKDIR /bluebuild
ENTRYPOINT ["bluebuild"]

DO cargo+SAVE_IMAGE --IMAGE=$IMAGE --TAG=$TAG --LATEST=$LATEST --NIGHTLY=$NIGHTLY

cosign:
FROM gcr.io/projectsigstore/cosign
SAVE ARTIFACT /ko-app/cosign
Loading

0 comments on commit 54ab8a6

Please sign in to comment.