Skip to content

Change default command #35

Change default command

Change default command #35

Workflow file for this run

on:
push:
tags:
- 'v*.*.*'
name: Build
jobs:
publish:
strategy:
matrix:
go-version: [1.18.x]
os:
- ubuntu-latest
name: Docker Build
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.18.0' # The Go version to download (if necessary) and use.
- name: Set env
run: echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV
- name: Build docker image
run: docker build -t tomwright/daselplayground:latest .
- name: Docker login
run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u TomWright --password-stdin
- name: Docker tag latest
run: docker tag tomwright/daselplayground:latest ghcr.io/tomwright/daselplayground:latest
- name: Docker tag release
run: docker tag tomwright/daselplayground:latest ghcr.io/tomwright/daselplayground:${{ env.RELEASE_VERSION }}
- name: Docker push latest
run: docker push ghcr.io/tomwright/daselplayground:latest
- name: Docker push release
run: docker push ghcr.io/tomwright/daselplayground:${{ env.RELEASE_VERSION }}