Merge pull request #403 from devmehq/renovate/all-minor-patch #398
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/[email protected] | |
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 }}:[email protected]/".insteadOf "https://github.com/" | |
git config --global url."https://${{ env.GH_PAT }}:[email protected]/".insteadOf "ssh://[email protected]/" | |
- 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 |