Skip to content

Commit

Permalink
Update eoefans-api-docker-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kazami139 authored and GitHub Enterprise committed Feb 11, 2023
1 parent 4bccbe3 commit c5ab7ea
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/eoefans-api-docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,17 @@ jobs:
- run: |
echo "IMAGE_TAG=${{steps.tag.outputs.tag}}" >> $GITHUB_ENV
echo $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to GitHub Docker Registry
uses: docker/login-action@v2
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}


- name: Build and push Docker image with version number
uses: docker/build-push-action@v4
with:
push: true
file: ${{ env.DOCKERFILE_PATH }}
tags: |
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}

- name: Build the Docker image with tag
run: docker build . --file ${{ env.DOCKERFILE_PATH }} --tag ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}

- name: push docker image with tag
run: docker push ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}

- name: Build and push Docker image with latest
uses: docker/build-push-action@v4
with:
push: true
file: ${{ env.DOCKERFILE_PATH }}
tags: |
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:latest

0 comments on commit c5ab7ea

Please sign in to comment.