Skip to content

Merge pull request #171 from OkieOth/update_golang_template #82

Merge pull request #171 from OkieOth/update_golang_template

Merge pull request #171 from OkieOth/update_golang_template #82

# This workflow will create the docker image and deploy it to the github repository
name: yacg tests and docker build
on:
push:
branches: [ master ]
jobs:
call-workflow-test:
uses: OkieOth/yacg/.github/workflows/__tests.yml@6.2.3
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build image
run: docker build -t ghcr.io/okieoth/yacg:`cat version.txt | grep -P '\d+\.\d+\.\d+'` .
- name: Login to GitHub Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u okieoth --password-stdin
- name: Push the Docker image
run: docker push ghcr.io/okieoth/yacg:`cat version.txt | grep -P '\d+\.\d+\.\d+'`
- name: tag images as latest
run: docker tag ghcr.io/okieoth/yacg:`cat version.txt | grep -P '\d+\.\d+\.\d+'` ghcr.io/okieoth/yacg
- name: Push the latest Docker image
run: docker push ghcr.io/okieoth/yacg