fix: update utils.js #122
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: dev | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-mariadb: | |
if: "!contains(github.event.head_commit.message, '#release')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PA_TOKEN }} | |
submodules: true | |
- name: Docker login | |
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin | |
- uses: benjlevesque/short-sha@v2.2 | |
id: short-sha | |
- name: Set build tag | |
run: echo "DOCKER_IMAGE_TAG=dev-${{ steps.short-sha.outputs.sha }}-$(date +%s)" >> $GITHUB_ENV | |
- name: Build container | |
run: docker build -f docker/mariadb/Dockerfile -t ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }} . | |
- name: Publish container | |
run: | | |
docker push ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }} | |
docker tag ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }} ghcr.io/gurbaninow/database:dev | |
docker push ghcr.io/gurbaninow/database:dev | |
build-sqlite: | |
if: "!contains(github.event.head_commit.message, '#release')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PA_TOKEN }} | |
submodules: true | |
- uses: actions/setup-node@v3 | |
- run: npm ci | |
- name: Build database | |
run: npm run build-sqlite | |
- name: Store database artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: database.sqlite | |
path: build/database.sqlite |