Merge pull request #394 from devmehq/renovate/marked-14.x #399
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-docker-image | |
on: | |
push: | |
paths: | |
- 'test/**' | |
- 'scripts/**' | |
- 'bin/**' | |
- 'src/**' | |
- 'src/**' | |
- 'yarn.lock' | |
- 'Dockerfile' | |
branches: | |
- '!*' | |
- 'develop' | |
- 'stage' | |
- 'master' | |
env: | |
GH_PAT: ${{ secrets.GH_PAT }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CI: true | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 20 | |
steps: | |
- uses: styfle/cancel-workflow-action@0.12.1 | |
with: | |
workflow_id: build-docker.yml | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
with: | |
fetch-depth: 30 | |
persist-credentials: false | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: General | |
run: | | |
# comment | |
GIT_BRANCH=${{ github.ref }} | |
echo "REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')" >> $GITHUB_ENV | |
echo "GIT_BRANCH=$(echo "${GIT_BRANCH/refs\/heads\//}")" >> $GITHUB_ENV | |
echo "COMMIT_DATE=$(git log -n 1 --pretty='format:%cd' --date=format:'%y-%m-%d')" >> $GITHUB_ENV | |
echo "GH_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-7)" >> $GITHUB_ENV | |
git config --global url."https://${{ env.GH_PAT }}:x-oauth-basic@github.com/".insteadOf "https://github.com/" | |
git config --global url."https://${{ env.GH_PAT }}:x-oauth-basic@github.com/".insteadOf "ssh://git@github.com/" | |
- uses: bahmutov/npm-install@v1 | |
with: | |
install-command: yarn --frozen-lockfile --silent | |
# pdftotext -> ubuntu | |
# mac -> poppler | |
- name: install deps | |
run: | | |
sudo apt update | |
sudo apt install poppler-utils antiword unrtf tesseract-ocr libtesseract-dev -y | |
- name: build | |
run: | | |
yarn build | |
- name: Test | |
run: | | |
yarn test && yarn lint |