bashhub-server/.github/workflows/release.yml
2020-02-09 20:40:58 -05:00

33 lines
1.1 KiB
YAML

name: Release
on:
create:
tags:
- v*.*.*
jobs:
build:
name: Docker-Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- uses: actions/checkout@master
- name: Get the Date
id: get_date
run: echo ::set-output name=DATE::$(date '+%Y-%m-%d-%H:%M:%S')
- uses: actions/checkout@master
- name: Get docker version
id: get_docker_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | sed 's/v//g' )
- uses: elgohr/Publish-Docker-Github-Action@master
with:
name: nicksherron/bashhub-server
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: Dockerfile
buildargs: VERSION=${{ steps.get_version.outputs.VERSION }},BUILD_DATE=${{ steps.get_date.outputs.DATE }},GIT_COMMIT=${{github.sha}}
tags: latest,${{steps.get_docker_version.outputs.VERSION}}