Skip to content

Commit

Permalink
add github release action
Browse files Browse the repository at this point in the history
  • Loading branch information
choffmeister committed Nov 13, 2021
1 parent 5f72822 commit 0cecb89
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release
on:
push:
tags:
- "v*"
env:
GO111MODULE: on
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17.x
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: docker/login-action@v1
with:
registry: https://ghcr.io
username: choffmeister
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v3
with:
images: ghcr.io/choffmeister/git-ops-update
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
id: docker-meta
- uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ BIN := git-ops-update
REGISTRY ?= ghcr.io/choffmeister

IMAGE := $(REGISTRY)/$(BIN)

# This version-strategy uses git tags to set the version string.
VERSION := $(shell git describe --tags --always --dirty)
VERSION := test

MAIN := ./cmd/git-ops-update
TEST := ./internal
Expand Down

0 comments on commit 0cecb89

Please sign in to comment.