Update text #146
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Image CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: Docker | |
| # Define the tag once so both steps use the exact same value | |
| env: | |
| IMAGE_TAG: ${{ github.sha }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build the Docker image | |
| run: docker build . --file Dockerfile --tag duylongcontainer/ui:latest | |
| - name: Push to Dockerhub | |
| run: docker push duylongcontainer/ui:latest | |