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 use Vib's recipe #8

Merged
merged 1 commit into from
Apr 29, 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
10 changes: 10 additions & 0 deletions .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: [ "main" ]
pull_request:

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

- uses: vanilla-os/[email protected]
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/differ:main .

Expand Down
22 changes: 0 additions & 22 deletions Containerfile

This file was deleted.

47 changes: 47 additions & 0 deletions recipe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Differ
id: differ
stages:
- id: build
base: docker.io/golang:1.21-alpine
singlelayer: false
labels:
maintainer: Mateus Melchiades
cmd: ["/home/user/differ"]
expose:
"8080": ""
modules:
- name: init
type: shell
source:
type: git
url: https://github.com/Vanilla-OS/Differ
branch: main
commit: latest
commands:
- mkdir /home/user
- cp /sources/init/main.go /home/user/
- cp /sources/init/go.mod /home/user/
- cp /sources/init/go.sum /home/user/
- cp /sources/init/go.work /home/user/
- cp /sources/init/Makefile /home/user/
- mv /sources/init/core /home/user/core/
- mv /sources/init/diff /home/user/diff/
- mv /sources/init/types /home/user/types/
- mv /sources/init/vendor /home/user/vendor/
- rm -rf /sources/init

- name: install-deps
type: shell
commands:
- apk add gcc musl-dev sqlite make

- name: build
type: shell
commands:
- cd /home/user
- make

- name: cleanup
type: shell
commands:
- rm -rf main.go go.mod go.sum go.work Makefile core/ types/ vendor/