Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathew Walters authored and Mathew Walters committed Nov 6, 2024
1 parent d54b51a commit 1671028
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

0 comments on commit 1671028

Please sign in to comment.