server: Add field groups, data source config file #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | |
permissions: | |
packages: write | |
on: | |
push: | |
branches: [ "main" ] | |
tags: [ "*.*.*" ] | |
pull_request: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Prepare nix | |
uses: cachix/install-nix-action@v18 | |
with: | |
extra_nix_config: | | |
accept-flake-config = true | |
substituters = https://cache.iog.io https://iohk.cachix.org https://cache.nixos.org/ | |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
allow-import-from-derivation = true | |
- name: Build images using nix | |
run: | | |
IMAGE_NAME=ghcr.io/${{github.repository_owner}}/easy-bi-server | |
echo "IMAGE_NAME=${IMAGE_NAME}" >> $GITHUB_ENV | |
nix build .#docker.easy-bi-server && docker load < ./result | |
echo "FROM easy-bi-server" | docker build \ | |
--label org.opencontainers.image.source=https://github.com/j-mueller/easy-bi \ | |
--label org.opencontainers.image.licenses=Apache-2.0 \ | |
--label org.opencontainers.image.created=$(date -Is) \ | |
--label org.opencontainers.image.revision=${{github.sha}} \ | |
--label org.opencontainers.image.version=unstable \ | |
--tag ${IMAGE_NAME}:unstable - | |
# Also tag with semver if we are building a tag | |
building_tag=${{github.ref_type == 'tag'}} | |
[[ ${building_tag} = true ]] && \ | |
docker tag ${IMAGE_NAME}:unstable ${IMAGE_NAME}:${{github.ref_name}} | |
docker images | |
docker inspect ${IMAGE_NAME}:unstable | |
- name: Push image to container registry | |
run: docker push -a ${IMAGE_NAME} |