Skip to content

Update dependency lint-staged to v15 #742

Update dependency lint-staged to v15

Update dependency lint-staged to v15 #742

Workflow file for this run

name: Build and deploy
on:
push:
branches:
- 'master'
pull_request:
types: [opened, reopened, synchronize, labeled]
jobs:
build_and_deploy:
if: |
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'NEED CI')) ||
(github.event_name == 'push' && startsWith(github.event.head_commit.message, ':bookmark: v'))
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: docker/metadata-action@v4
id: meta
with:
images: registry.digitalocean.com/XX/api
tags: |
type=semver,pattern={{raw}}
type=semver,pattern={{version}}
type=raw,value=${{ github.run_number }}
type=ref,event=pr
type=raw,value=latest,enable=${{ startsWith(github.event.head_commit.message, ':bookmark: v') }}
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/#-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🐳 Build
uses: docker/build-push-action@v4
with:
file: ./.docker/Dockerfile.api
push: true
provenance: false
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: ⚙️ Generate release infos
id: release
run: |
echo "release_tag=$(echo ${{ github.event.head_commit.message }} | grep -o 'v\(.*\)')" >> $GITHUB_OUTPUT
- name: 🔖 Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.release.outputs.release_tag }}
name: ${{ steps.release.outputs.release_tag }}