Skip to content

Update release-docker-images.yml #8

Update release-docker-images.yml

Update release-docker-images.yml #8

# Changes to workflow name require changes to badge URL in README.md
name: Docker image builds
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
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/[email protected]
with:
ref: ${{ steps.extranct_branch.outputs.branch }}
- name: Login to Docker Hub
uses: azure/docker-login@v2
with:
login-server: cttopolis.azurecr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build full project via docker-compose
run: |
mv example.env .env
docker compose build --parallel --build-arg GIT_HASH=${GITHUB_SHA:0:6}
- name: Push images to Docker Hub
run: docker compose push --ignore-push-failures