update node to 18.18.1 #25
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
name: build, test and publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- run: npm ci | |
- run: npm run test | |
deploy: | |
name: deploy | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Short SHA | |
id: sha | |
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)" | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: build and push | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: ${{ github.repository }}:${{ steps.sha.outputs.sha7 }} |