From 167102885e9098c6904c51faf9240a13e3b7d5e5 Mon Sep 17 00:00:00 2001 From: Mathew Walters Date: Wed, 6 Nov 2024 14:51:44 +0000 Subject: [PATCH] try again --- .github/workflows/ci.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a0680cf..71f3367 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,25 +16,24 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Set environment variables + run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | awk '{print tolower($0)}')" >> $GITHUB_ENV + - name: Log in to GitHub Container Registry uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: lowercase - run: | - echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}" + - name: Build Docker image run: | - docker build -t ghcr.io/${{ env.GITHUB_ENV }}:${{ github.sha }} . + docker build -t ghcr.io/$REPO_OWNER/demo-app:${{ github.sha }} . - name: Push Docker image run: | - docker push ghcr.io/${{ env.GITHUB_ENV }}:${{ github.sha }} + docker push ghcr.io/$REPO_OWNER/demo-app:${{ github.sha }} - name: Output image tag run: | - echo "Image: ghcr.io/${{ github.repository_owner }}:${{ github.sha }}" - - + echo "Image: ghcr.io/$REPO_OWNER/demo-app:${{ github.sha }}" \ No newline at end of file