Skip to content

Commit

Permalink
Merge pull request #9 from romeroalx/image-id-to-lowercase
Browse files Browse the repository at this point in the history
Make sure image ids are in lowercase. Added build validation on pull_request
  • Loading branch information
romeroalx authored Nov 23, 2023
2 parents 726bb50 + 077e21d commit 6631a44
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build-debian-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build Debian images for PDNS CI
on:
workflow_dispatch:
push:
pull_request:
schedule:
- cron: '0 23 * * *'

Expand All @@ -25,19 +26,24 @@ jobs:
steps:
- uses: actions/checkout@v3

- run: |
echo "image-id-lowercase=ghcr.io/${{ github.repository }}/${{ matrix.image-id }}" | tr '[:upper:]' '[:lower:]' >> "$GITHUB_ENV"
- name: Build image
run: |
docker build . --file Dockerfile \
--tag ghcr.io/${{ github.repository }}/${{ matrix.image-id }}:${{ env.IMAGE_TAG }} \
--tag ${{ env.image-id-lowercase }}:${{ env.IMAGE_TAG }} \
--build-arg DEBIAN_IMAGE_TAG=${{ matrix.debian-release-name }}
- name: Login to GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push into Github Container Registry
if: ${{ github.event_name != 'pull_request' }}
run: |
docker push ghcr.io/${{ github.repository }}/${{ matrix.image-id }}:${{ env.IMAGE_TAG }}
docker push ${{ env.image-id-lowercase }}:${{ env.IMAGE_TAG }}

0 comments on commit 6631a44

Please sign in to comment.