fix cypress tests #69
Workflow file for this run
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
# Changes to workflow name require changes to badge URL in README.md | |
name: Docker image builds | |
on: | |
push: | |
branches: | |
- edge-civictechto | |
pull_request: | |
branches: | |
- edge-civictechto | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
# Use native docker command within docker-compose | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
# Use buildkit to speed up docker command | |
DOCKER_BUILDKIT: 1 | |
steps: | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ steps.extract_branch.outputs.branch }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Build full project via docker-compose | |
run: | | |
mv example.env .env | |
sed -i 's/docker.io/ghcr.io/g' docker-compose.yml | |
sed -i 's/compdem/civictechto/g' docker-compose.yml | |
docker compose --profile postgres build --parallel --build-arg GIT_HASH=${GITHUB_SHA:0:6} | |
- name: Push images to Docker Hub | |
run: docker compose --profile postgres push --ignore-push-failures |