Skip to content

Commit

Permalink
Merge pull request #12 from Pressio/4-fixrevise-naming-convention-for…
Browse files Browse the repository at this point in the history
…-all-containers

#4: Fix naming conventions on containers
  • Loading branch information
fnrizzi authored Jan 31, 2025
2 parents 84d25e5 + 7dac591 commit f4dd08c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Construct Docker image name
run: |
IMAGE_NAME=$(echo ${{ matrix.config.dockerfile }} | sed -E 's/^([^-]+)-([^-]+)/\1-\2${{ matrix.config.compiler-version }}/')
echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -54,9 +59,10 @@ jobs:
- name: Build and Push Docker images for Github Container Registry
uses: docker/build-push-action@v6
with:
tags: ghcr.io/pressio/${{ matrix.config.dockerfile }}-${{ matrix.config.compiler-version }}:${{ matrix.config.tag }}
tags: ghcr.io/pressio/${{ env.IMAGE_NAME }}:${{ matrix.config.tag }}
file: docker_scripts/${{ matrix.config.dockerfile }}.dockerfile
build-args: |
COMPILER_VERSION=${{ matrix.config.compiler-version }}
DOCKER_TAG=${{ matrix.config.tag }}
push: true
# Only push image if running on main or develop
push: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}

0 comments on commit f4dd08c

Please sign in to comment.