micrach/.github/workflows/push.yml
Yanislav Igonin c44cd18812 debug build
2021-08-29 09:45:06 +03:00

45 lines
1.0 KiB
YAML

name: Push
on: [push, release]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
- name: Build
run: GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build .
- name: Upload build
uses: actions/upload-artifact@v2
with:
name: micrach
path: micrach
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download build
uses: actions/download-artifact@v2
with:
name: micrach
path: micrach
- name: Build docker image and push to GitHub registry
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: yanislav-igonin/micrach-go/micrach
dockerfile: Dockerfile
tags: latest
# build_args: CI_COMMIT_TAG=${{ github.event.release.tag_name }}