Skip to content

Commit

Permalink
Updated the build and push step
Browse files Browse the repository at this point in the history
  • Loading branch information
BanulaKumarage committed Feb 12, 2024
1 parent b4da362 commit 012da99
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
echo "File version: $VERSION"
echo "::set-output name=version::$VERSION"
- name: Build Docker Image
- name: Build and Push Docker Image
run: |
docker build -t "${IMAGE_NAME}:temp" .
CONTAINER_ID=$(docker create "${IMAGE_NAME}:temp")
docker export "${CONTAINER_ID}" | docker import - "${IMAGE_NAME}:${{ steps.get-version.outputs.version }}"
docker build -t "${{secrets.DOCKER_USER}}/${IMAGE_NAME}:${{ steps.get-version.outputs.version }}" .
docker push "${{secrets.DOCKER_USER}}/${IMAGE_NAME}:${{ steps.get-version.outputs.version }}"

0 comments on commit 012da99

Please sign in to comment.