master #121
Workflow file for this run
This file contains hidden or 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
| # run build on master brunch. build docker image and push to docker hub | |
| name: master | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - '*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22' | |
| - name: install dependencies | |
| run: npm i | |
| - name: dependency check | |
| run: npm run dependencyCheck | |
| - name: run all tests | |
| run: npm test | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: build app & docker image | |
| env: | |
| DOCKER_REGISTRY: ghcr.io | |
| DOCKER_USERNAME: ${{ github.repository_owner }} | |
| run: npm run build:dockerImage | |
| - name: Push Docker image | |
| run: | | |
| docker image push --all-tags "ghcr.io/${{ github.repository_owner }}/poinz" || docker image push "ghcr.io/${{ github.repository_owner }}/poinz" |