micrach/.github/workflows/push.yml

45 lines
1016 B
YAML
Raw Normal View History

2021-08-28 19:34:34 +03:00
name: Push
2021-08-28 19:36:13 +03:00
on: [push, release]
2021-08-28 19:34:34 +03:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
- name: Build
run: go build .
2021-08-28 19:49:43 +03:00
- name: Upload build
uses: actions/upload-artifact@v2
with:
name: micrach
path: micrach
2021-08-28 19:34:34 +03:00
2021-08-28 19:49:43 +03:00
release:
2021-08-28 19:50:24 +03:00
needs: build
2021-08-28 19:52:09 +03:00
2021-08-28 19:49:43 +03:00
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
2021-08-28 19:52:09 +03:00
repository: yanislav-igonin/micrach-go/micrach
2021-08-28 19:49:43 +03:00
dockerfile: Dockerfile
tags: latest
# build_args: CI_COMMIT_TAG=${{ github.event.release.tag_name }}