1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- 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.4
- - name: docker push
- docker push ccr.ccs.tencentyun.com/jianboy/wordtohtml:v1.0.4
- docker tag $(docker images ccr.ccs.tencentyun.com/jianboy/wordtohtml:v1.0.4 -q) ccr.ccs.tencentyun.com/jianboy/wordtohtml:latest
- docker push ccr.ccs.tencentyun.com/jianboy/wordtohtml:latest
|