Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: port Containerfile to Vib recipe format #179

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Image
on:
push:
branches: [ "v2" ]
pull_request:

env:
REGISTRY_USER: ${{ github.actor }}
Expand All @@ -14,11 +15,20 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: vanilla-os/vib-gh-action@v0.7.0
with:
recipe: 'recipe.yml'

- uses: actions/upload-artifact@v4
with:
name: Containerfile
path: Containerfile

- name: Build image
run: docker image build -f Containerfile --tag ghcr.io/vanilla-os/website:main .

- name: Publish image
if: github.repository == 'vanilla-os/website'
if: github.repository == 'Vanilla-OS/website' && github.ref == 'refs/heads/main'
run: |
docker login ghcr.io -u ${{ env.REGISTRY_USER }} -p ${{ env.REGISTRY_PASSWORD }}
docker image push "ghcr.io/vanilla-os/website:main"
11 changes: 0 additions & 11 deletions Containerfile

This file was deleted.

28 changes: 28 additions & 0 deletions recipe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Website
id: website
stages:
- id: build
base: node:lts
singlelayer: false
labels:
maintainer: Vanilla OS Contributors
cmd: ["sh", "-c", "cd /app && npm run start"]
expose:
"6080": ""
modules:
- name: init
type: shell
source:
type: git
url: https://github.com/Vanilla-OS/website
branch: v2
commit: latest
commands:
- mv /sources/init /app

- name: build
type: shell
commands:
- cd /app
- npm install
- npm run build