Skip to content

fix: discard problems when .env file doesn't exist #9

fix: discard problems when .env file doesn't exist

fix: discard problems when .env file doesn't exist #9

Workflow file for this run

name: go_build_test
on:
push:
tags: [v*]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: get version
id: get-version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: build
run: docker build -f Dockerfile --tag hermes --label "runnumber=${GITHUB_RUN_ID}" .
- name: log in to the registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $ --password-stdin
- name: Deploy
env:
IMAGE_TAG: ${{ steps.get-version.outputs.VERSION }}
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/hermes
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
docker tag hermes $IMAGE_ID:$IMAGE_TAG
docker push $IMAGE_ID:$IMAGE_TAG
if [[ ${{ steps.get-version.outputs.VERSION }} != *rc* ]]; then
docker tag $IMAGE_ID:$IMAGE_TAG $IMAGE_ID:latest
docker push $IMAGE_ID:latest
fi