Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
View runs Go to file
 
 
Cannot retrieve contributors at this time
name: release
on:
push:
tags:
- '*'
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
id: go
- name: Check out code
uses: actions/checkout@v2
- name: Test code
run: go test -v ./...
- name: Set some variables
id: vars
run: |
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/*/})
echo ::set-output name=image::mtharrison/github-pr-comment-resource
- name: Login to DockerHub
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build the tagged Docker image
run: docker build . -t ${{steps.vars.outputs.image}}:${{steps.vars.outputs.tag}}
- name: Push the tagged Docker image
run: docker push ${{steps.vars.outputs.image}}:${{steps.vars.outputs.tag}}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false