Skip to content

Files are now .tar.gz #6

Files are now .tar.gz

Files are now .tar.gz #6

Workflow file for this run

---
name: "Run Tests"
on:
pull_request:
push:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
with:
name: edemocracy
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix develop --impure -c ./test-setup.sh /tmp
- run: nix develop --impure -c pytest
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
with:
name: edemocracy
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: set lower case owner name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: '${{ github.repository_owner }}'
- name: set tag to latest
run: |
sed -i 's/ contents/ tag = "latest";\n contents/' nix/docker.nix nix/docker_static.nix
- name: Build docker image
run: nix develop --impure -c build_docker
- name: Load app image
run: docker load -i docker-image-ekklesia-portal.tar.gz
if: github.ref == 'refs/heads/piraten-bund'
- name: Load static image
run: docker load -i docker-image-ekklesia-portal-static.tar.gz
if: github.ref == 'refs/heads/piraten-bund'
- name: Login to docker registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
if: github.ref == 'refs/heads/piraten-bund'
- name: Push docker image
run: docker push ghcr.io/${{ env.OWNER_LC }}/ekklesia-portal:latest
if: github.ref == 'refs/heads/piraten-bund'
- name: Push docker static image
run: docker push ghcr.io/${{ env.OWNER_LC }}/ekklesia-portal-static:latest
if: github.ref == 'refs/heads/piraten-bund'
- uses: actions/upload-artifact@v3
with:
name: Ekklesia Docker Images
path: docker-image-*.tar.gz
# vim: set filetype=yaml sw=2 ts=2 sts=2 expandtab: