Skip to content

Commit

Permalink
Moved workflow content into actual workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mephenor committed May 28, 2024
1 parent 800e684 commit 7c0f627
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/ci_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ name: "Push to docker on new commit to main"
on: push

env:
DOCKERHUB_NAMESPACE: ghga
DOCKERHUB_PLATFORMS: "linux/amd64,linux/arm64"
IFRS_CONFIG_YAML: ./services/ifrs/dev_config.yaml
IRS_CONFIG_YAML: ./services/irs/dev_config.yaml
PCS_CONFIG_YAML: ./services/pcs/dev_config.yaml
Expand Down Expand Up @@ -70,10 +72,20 @@ jobs:
id: prepare-dockerfile
run: cp Dockerfile services/${{ matrix.service }}/ && sed -i "s/\(ENTRYPOINT \)\[\]/\1[\"${{ matrix.service }}\"]/" services/${{ matrix.service }}/Dockerfile

- name: Build and push ${{ matrix.service }} to Docker hub
id: docker-push
uses: ./reusable_workflows/docker_debug
- uses: docker/setup-qemu-action@v3
name: Set up QEMU

- uses: docker/setup-buildx-action@v3
name: Set up Docker Buildx

- uses: docker/build-push-action@v5
name: Build and push
id: docker_build
with:
working_directory: services/${{ matrix.service }}
service_name: ${{ steps.extract-service-name.outputs.name }}
version: ${{ steps.extract-service-version.outputs.version }}
platforms: "${{ env.DOCKERHUB_PLATFORMS }}"
tags: "${{ env.DOCKERHUB_NAMESPACE }}/${{ steps.extract-service-name.outputs.name }}:${{ steps.extract-service-version.outputs.version }}"
context: "services/${{ matrix.service }}"

- name: Image digest
shell: bash
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 7c0f627

Please sign in to comment.