mirror of https://github.com/kha7iq/pingme
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.4 KiB
62 lines
1.4 KiB
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
paths-ignore:
|
|
- '**.md'
|
|
tags:
|
|
- 'v*.*.*'
|
|
|
|
jobs:
|
|
release-pingme:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2.3.4
|
|
with:
|
|
fetch-depth: 0
|
|
-
|
|
name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '1.16'
|
|
-
|
|
name: Cache Go modules
|
|
uses: actions/cache@v2.1.5
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
-
|
|
name: Diff
|
|
run: git diff
|
|
|
|
-
|
|
name: Docker login GHCR
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
-
|
|
name: Docker Login DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
-
|
|
name: Release PingMe
|
|
uses: goreleaser/goreleaser-action@v2
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} |