further refactoring of slot null checks to optional chaining #3163
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: Lint, build and publish | |
on: | |
push: | |
branches: | |
- '**' | |
- '!crowdin' | |
tags: | |
- '*' | |
pull_request_target: | |
branches: | |
- '*' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
steps: | |
- name: Checkout your repository using git | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: npm | |
- name: Install Node Dependencies | |
run: | | |
npm install | |
- name: Run linters | |
uses: wearerequired/lint-action@v2 | |
with: | |
eslint: true | |
eslint_extensions: ts,vue | |
eslint_args: --ignore-path .gitignore | |
push_to_registry: | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
- | |
name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
corsace/corsace | |
# generate Docker tags based on the following events/attributes | |
# on push event: tag using git sha, branch name and as latest (if master) | |
tags: | | |
type=raw,value=latest,enable=${{ github.ref_type == 'branch' && github.ref_name == 'master' }} | |
type=raw,value=${{ github.ref_name }} | |
type=raw,value=${{ github.sha }},enable=${{ github.ref_type == 'branch' }} | |
flavor: | | |
latest=false | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- | |
name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64 | |
push: ${{ github.repository == 'Corsace/Corsace' && github.event_name != 'pull_request_target' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |