Merge pull request #1041 from hivtools/nm-62 #370
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "*" | |
name: Build and Push App | |
env: | |
TAG_DH: mrcide/hint | |
TAG_GHCR: hivtools/hint | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Make shared env | |
id: ci-env | |
uses: ./.github/actions/make-shared-env | |
with: | |
dh-username: ${{ secrets.DOCKERHUB_USERNAME }} | |
dh-password: ${{ secrets.DOCKERHUB_TOKEN }} | |
ghcr-username: ${{ github.actor }} | |
ghcr-password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build app | |
env: | |
NODE_ENV: production | |
run: src/gradlew -p src :app:bootDistTar | |
- name: Build and push docker | |
uses: docker/build-push-action@v5 | |
with: | |
context: src | |
file: ./Dockerfile | |
push: true | |
tags: | | |
${{env.TAG_DH}}:${{steps.ci-env.outputs.CI_SHA}} | |
${{env.TAG_DH}}:${{steps.ci-env.outputs.CI_BRANCH}} | |
ghcr.io/${{env.TAG_GHCR}}:${{steps.ci-env.outputs.CI_SHA}} | |
ghcr.io/${{env.TAG_GHCR}}:${{steps.ci-env.outputs.CI_BRANCH}} |