Skip to content

Commit

Permalink
CI fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
loan-mgt committed Nov 10, 2024
1 parent ec9f6fe commit 5ce49b5
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build Docker image
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
load: true # Load the built image into Docker's local cache
push: true # Push the image instead of loading it locally
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand All @@ -54,6 +54,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to Container Registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull Docker image for testing
run: |
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.build-image.outputs.image-tags }}
- name: Run Docker container for testing
run: |
docker run -d -p 8080:8080 --name test_container ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.build-image.outputs.image-tags }}
Expand Down

0 comments on commit 5ce49b5

Please sign in to comment.