Skip to content

Commit

Permalink
lowercase repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacobbrewer1 committed Nov 12, 2024
1 parent f7db8df commit d0fa9d0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,16 @@ jobs:
id: shorten_hash
run: echo "HASH=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV

- name: Lowercase Repository
id: lowercase_repository
run: echo "REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Lowercase Image Name
run: echo "LOWER_IMAGE_NAME=$(echo ${{ github.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

- name: Build app
run: |
docker build -t ${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ env.HASH }} -t ${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }}:latest .
docker build -t ${{ env.LOWER_IMAGE_NAME }}:${{ env.HASH }} -t ${{ env.LOWER_IMAGE_NAME }}:latest .
echo "hash=$hash" >> $GITHUB_ENV
- name: Push app
if: ${{ github.event_name != 'pull_request' }}
run: |
docker push ${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }}:$hash
docker push ${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }}:latest
docker push ${{ env.LOWER_IMAGE_NAME }}:$hash
docker push ${{ env.LOWER_IMAGE_NAME }}:latest

0 comments on commit d0fa9d0

Please sign in to comment.