Skip to content

Commit

Permalink
Update main.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredrik10a committed Jan 13, 2024
1 parent c6b3dd2 commit c468611
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,13 @@ jobs:
- name: Login to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: acr0dev.azurecr.io
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}

- name: Push Docker image to ACR
run: |
CURRENT_DATE=$(date +'%Y%m%d')
echo "CURRENT_DATE=$CURRENT_DATE" >> $GITHUB_ENV
IMAGE_NAME="acr0dev.azurecr.io/next-hello-world:${CURRENT_DATE}"
docker buildx create --use
docker buildx inspect
docker buildx build -t ${IMAGE_NAME} --push .
# Debug: Print the list of local Docker images
docker images
echo "Pushing image: $IMAGE_NAME"
docker push $IMAGE_NAME
- name: Build and Push to ACR
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ secrets.REGISTRY_LOGIN_SERVER }}/next-hello-world:${{ github.sha }}
file: Dockerfile

0 comments on commit c468611

Please sign in to comment.