Skip to content

Commit

Permalink
refactor workflows; add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
aine-etke committed Aug 8, 2024
1 parent 1dd9e57 commit 33023a4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 26 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/docker.yml

This file was deleted.

24 changes: 20 additions & 4 deletions .github/workflows/go.yml → .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: Go
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
checks: write
contents: read
pull-requests: read
jobs:
lint-test:
name: lint and test
name: Lint and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -30,3 +28,21 @@ jobs:
version: latest
- name: test
run: just test
build-release:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ github.repository }}:latest
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM registry.gitlab.com/etke.cc/base/build AS builder

WORKDIR /app
COPY . .
RUN just build

FROM registry.gitlab.com/etke.cc/base/app

COPY --from=builder /app/suae /bin/suae

USER app

ENTRYPOINT ["/bin/suae"]

0 comments on commit 33023a4

Please sign in to comment.