123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- name: Go
- on:
- push:
- branches: [ master, tmp ]
- pull_request:
- branches: [ master, tmp ]
- jobs:
- build:
- name: Build
- strategy:
- matrix:
- os: [ubuntu-latest]
- include:
- - os: ubuntu-latest
- path: |
- ~/.cache/go-build
- ~/go/pkg/mod
- runs-on: ubuntu-latest
- steps:
- - name: Set up Go 1.13
- uses: actions/setup-go@v1
- with:
- go-version: 1.13
- id: go
- - name: Check out code into the Go module directory
- uses: actions/checkout@v2
- - name: cache
- id: cache
- uses: actions/cache@v2
- with:
- path: ${{ matrix.path }}
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-go-
- - name: Get dependencies
- run: |
- go get
- if [ -f Gopkg.toml ]; then
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- dep ensure
- fi
- working-directory: ./
- - name: Build
- run: go build convert.go
- working-directory: ./
- - name: docker build
- run: |
- docker login --username=${{ secrets.USERNAME }} --password ${{ secrets.PASSWORD }} ccr.ccs.tencentyun.com
- docker build . -t ccr.ccs.tencentyun.com/jianboy/wordtohtml:v1.0.5
- - name: docker push
- run: |
- docker push ccr.ccs.tencentyun.com/jianboy/wordtohtml:v1.0.5
- docker tag $(docker images ccr.ccs.tencentyun.com/jianboy/wordtohtml:v1.0.5 -q) ccr.ccs.tencentyun.com/jianboy/wordtohtml:latest
- docker push ccr.ccs.tencentyun.com/jianboy/wordtohtml:latest
|