Skip to content

update golang version 1.20 #15

update golang version 1.20

update golang version 1.20 #15

Workflow file for this run

name: CI
# 在master分支发生push事件时触发。
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: GoModules
run: go env -w GO111MODULE=on
- name: tidy
run: go mod tidy
- name: run main.go
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build src/main.go
- name: BuildDockerImage
run: docker build . --file Dockerfile --tag chinaarjun/devtools:${{ github.ref_name }}
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: chinaarjun/devtools:${{ github.ref_name }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
snapshot: true