Skip to content

Commit

Permalink
dev: ci and flake revamp
Browse files Browse the repository at this point in the history
  • Loading branch information
ElysaSrc committed Apr 25, 2024
1 parent 107742d commit 7c94264
Show file tree
Hide file tree
Showing 74 changed files with 19,228 additions and 7,118 deletions.
4 changes: 0 additions & 4 deletions .dockerignore

This file was deleted.

1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
37 changes: 37 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
push:
branches:
- main
release:
types:
- created

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: DeterminateSystems/nix-installer-action@main

- name: Set container release tag
run: |
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
echo -n "${GITHUB_REF#refs/tags/}" > ./container_release
else
echo -n "main-$(git rev-parse --short HEAD)" > ./container_release
fi
# Export value to Github variables
echo "TAG=$(cat ./container_release)" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Build and push Docker image
run: |
nix-env -iA nixpkgs.skopeo
nix build .#dockerImage && ./result | \
gzip --fast | \
skopeo copy docker-archive:/dev/stdin docker://ghcr.io/SafeHavenMaps/safehaven:$TAG
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
push:
pull_request:
branches:
- main

Expand All @@ -8,10 +8,6 @@ jobs:
name: Build
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

services:
postgres:
image: postgis/postgis:16-3.4-alpine
Expand All @@ -23,5 +19,4 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- run: nix develop -c prepare
- run: nix develop -c test_and_lint
- run: nix develop -c check_project
45 changes: 0 additions & 45 deletions .github/workflows/release.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
.direnv
result
21 changes: 0 additions & 21 deletions Dockerfile

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7c94264

Please sign in to comment.