Skip to content

Update docker-image.yml #4

Update docker-image.yml

Update docker-image.yml #4

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
version=$(grep "<Version>" src/Directory.Build.props | awk -F'[<>]' '{print $3}')
echo $version
tag=registry.cn-hangzhou.aliyuncs.com/hgui/opentask:$version-$(date +%s)
echo $tag
docker build . --file Dockerfile --tag $tag
echo "${{ secrets.PASSWORD }}" | docker login --username=springhgui0127 registry.cn-hangzhou.aliyuncs.com --password-stdin
docker push $tag