Skip to content

frontend: fix tab switching on entity selector and map move #304

frontend: fix tab switching on entity selector and map move

frontend: fix tab switching on entity selector and map move #304

Workflow file for this run

on:
push:
branches:
- main
release:
types:
- created
jobs:
check:
runs-on: ubuntu-latest
services:
postgres:
image: postgis/postgis:16-3.4-alpine
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
- name: Run project checks
run: nix develop -c check_project
build_x64:
needs:
- check
name: Build x86_64 Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
- name: Set container release tag
run: |
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
echo -n "${GITHUB_REF#refs/tags/}-x64" > ./container_release
# Replace the version in backend/build.rs
sed -i "s/main/$TAG/" backend/build.rs
else
echo -n "main-$(git rev-parse --short HEAD)-x64" > ./container_release
fi
# Export value to Github variables
echo "TAG=$(cat ./container_release)" >> $GITHUB_ENV
# Set the commit short hash (from the GitHub action variables) in the backend/build.rs
sed -i "s/current/$GITHUB_SHA/" backend/build.rs
- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | skopeo login ghcr.io --username ${{ github.actor }} --password-stdin
- name: Build and push Docker image
run: |
nix build .#dockerImage
./result | gzip --fast | \
skopeo copy \
docker-archive:/dev/stdin \
docker://ghcr.io/safehavenmaps/safehaven:$TAG
build_arm64:
# aarch64 are terribly long. We only build on release events.
if: github.event_name == 'release'
needs:
- check
name: Build arm64 Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install QEMU
run: sudo apt-get install -y qemu-user-static
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
system = aarch64-linux
- name: Set container release tag
run: |
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
echo -n "${GITHUB_REF#refs/tags/}-arm64" > ./container_release
# Replace the version in backend/build.rs
sed -i "s/main/$TAG/" backend/build.rs
else
echo -n "main-$(git rev-parse --short HEAD)-arm64" > ./container_release
fi
# Export value to Github variables
echo "TAG=$(cat ./container_release)" >> $GITHUB_ENV
# Set the commit short hash (from the GitHub action variables) in the backend/build.rs
sed -i "s/current/$GITHUB_SHA/" backend/build.rs
- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | skopeo login ghcr.io --username ${{ github.actor }} --password-stdin
- name: Build and push Docker image
run: |
nix build .#dockerImage
./result | gzip --fast | \
skopeo copy \
docker-archive:/dev/stdin \
docker://ghcr.io/safehavenmaps/safehaven:$TAG