Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed Aug 10, 2023
1 parent 12bfdf1 commit 4ce13f0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,17 @@ jobs:
DOCKER_PASSWORD: ${{secrets.DOCKER_ACCESS_TOKEN}}
run: |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- name: Determine Docker Image Name
id: image
run: |
if [[ "${{github.ref_name}}" == "master" ]]; then
echo "name=xinfinorg/subnet-frontend:latest" >> $GITHUB_OUTPUT
else
echo "name=xinfinorg/subnet-frontend:${{github.ref_name}}" >> $GITHUB_OUTPUT
fi
- name: Docker build and tag image
run: cd frontend && docker build . --file Dockerfile --tag xinfinorg/subnet-frontend:latest
- name: Docker push
run: docker push xinfinorg/subnet-frontend:latest
run: cd frontend && docker build . --file Dockerfile --tag ${{ steps.image.outputs.name }}

- name: Docker push
run: docker push ${{ steps.image.outputs.name }}

0 comments on commit 4ce13f0

Please sign in to comment.