build(deps): bump ws from 7.5.9 to 7.5.10 #495
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: ci | |
on: | |
push: | |
branches: | |
- '**' # matches every branch | |
pull_request: | |
branches: | |
- 'main' | |
types: [opened] | |
jobs: | |
contextualize: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Set env.BRANCH | |
run: echo "IS_MAIN_BRANCH=${{ (github.ref_name == 'main') }}" >> $GITHUB_ENV | |
outputs: | |
is_main_branch: ${{ env.IS_MAIN_BRANCH }} | |
docker: | |
needs: [contextualize] | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Login to Docker Hub | |
if: ${{ needs.contextualize.outputs.is_main_branch == 'true' }} | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME || 'username' }} | |
password: ${{ secrets.DOCKERHUB_TOKEN || 'passord' }} | |
- | |
name: Build (and deploy if on main) Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ needs.contextualize.outputs.is_main_branch }} | |
tags: kinoba/javascript-static-code-analyzer:latest |