support detect empty line in CSV config file #21
Workflow file for this run
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: | |
| tags: | |
| - V* | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| inputs: | |
| logLevel: | |
| description: "Log level" | |
| required: true | |
| default: "warning" | |
| tags: | |
| description: "Test scenario tags" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| # GitHub Repo => Settings => Secrets 增加 docker hub 登录密钥信息 | |
| # DOCKERHUB_USERNAME 是 docker hub 账号名. | |
| # DOCKERHUB_TOKEN: docker hub => Account Setting => Security 创建. | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| # 通过 git 命令获取当前 tag 信息, 存入环境变量 APP_VERSION | |
| - name: Generate App Version | |
| run: echo APP_VERSION=`git describe --tags --always` >> $GITHUB_ENV | |
| # 构建 Docker 并推送到 Docker hub | |
| - name: Build and push the Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| push: true | |
| tags: | | |
| showjimzc/edit_pat_webapp:${{ env.APP_VERSION }} | |
| showjimzc/edit_pat_webapp:latest | |
| # run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) |