Skip to content

Commit

Permalink
testing split build
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Meloni committed Nov 20, 2024
1 parent 0a33313 commit 62afd30
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,13 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: lowercase owner name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: '${{ github.repository_owner }}'
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{env.OWNER_LC}}/mucoll-dummy
images: ghcr.io/${{ secrets.DOCKERHUB_REPOSITORY }}/mucoll-dummy
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v6
Expand All @@ -85,8 +79,8 @@ jobs:
file: ./${{matrix.os.dir}}/Dockerfile-base
build-args: |
VERSION=${{ steps.meta.outputs.version }}
REPOSITORY=ghcr.io/${{env.OWNER_LC}}
tags: ghcr.io/${{env.OWNER_LC}}/mucoll-base:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}
REPOSITORY=ghcr.io/${{ secrets.DOCKERHUB_REPOSITORY }}
tags: ghcr.io/${{ secrets.DOCKERHUB_REPOSITORY }}/mucoll-base:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}
build-sim:
runs-on: ubuntu-latest
needs: build-base
Expand All @@ -103,19 +97,13 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: lowercase owner name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: '${{ github.repository_owner }}'
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{env.OWNER_LC}}/mucoll-dummy
images: ghcr.io/${{ secrets.DOCKERHUB_REPOSITORY }}/mucoll-dummy
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v6
Expand All @@ -125,5 +113,5 @@ jobs:
file: ./${{matrix.os.dir}}/Dockerfile-sim
build-args: |
VERSION=${{ steps.meta.outputs.version }}
REPOSITORY=ghcr.io/${{env.OWNER_LC}}
tags: ghcr.io/${{env.OWNER_LC}}/mucoll-sim:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}
REPOSITORY=ghcr.io/${{ secrets.DOCKERHUB_REPOSITORY }}
tags: ghcr.io/${{ secrets.DOCKERHUB_REPOSITORY }}/mucoll-sim:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}

0 comments on commit 62afd30

Please sign in to comment.