From 8e42b1c6f50dc4116c20eb5ab100af490449a6c1 Mon Sep 17 00:00:00 2001 From: nicksherron Date: Sun, 9 Feb 2020 20:40:58 -0500 Subject: [PATCH] first release --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4a60acb --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +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}}