-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
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 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.DS_Store | ||
.direnv | ||
result |
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.