diff options
author | joffrey-bion <joffrey.bion@gmail.com> | 2020-12-12 22:51:18 +0100 |
---|---|---|
committer | joffrey-bion <joffrey.bion@gmail.com> | 2020-12-12 22:51:18 +0100 |
commit | d39c36cc037b963beb442f0eb3ef1d2b69b10638 (patch) | |
tree | bc85593de872671b13c89968e35a31907ab656da | |
parent | Avoid too specific version for actions/cache (diff) | |
download | seven-wonders-d39c36cc037b963beb442f0eb3ef1d2b69b10638.tar.gz seven-wonders-d39c36cc037b963beb442f0eb3ef1d2b69b10638.tar.bz2 seven-wonders-d39c36cc037b963beb442f0eb3ef1d2b69b10638.zip |
Use env variables to generalize GitHub workflow
-rw-r--r-- | .github/workflows/ci.yml | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f4ecc6a..8b9ac480 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,11 @@ on: pull_request: branches: [ master ] +env: + DOCKERHUB_USER: hildan + DOCKER_IMAGE_NAME: seven-wonders-server + HEROKU_APP_NAME: seven-wonders-online + jobs: build: runs-on: ubuntu-latest @@ -44,7 +49,7 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v1 with: - username: hildan + username: ${{ env.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry @@ -68,6 +73,6 @@ jobs: file: ./sw-server/Dockerfile push: true tags: | - hildan/seven-wonders-server:latest - ghcr.io/joffrey-bion/seven-wonders-server:latest - registry.heroku.com/seven-wonders-online/web + ${{ env.DOCKERHUB_USER }}/${{ env.DOCKER_IMAGE_NAME }}:latest + ghcr.io/${{ github.repository_owner }}/${{ env.DOCKER_IMAGE_NAME }}:latest + registry.heroku.com/${{ env.HEROKU_APP_NAME }}/web |