Skip to content

feat: add type hint for _get_linker_entities function in app_helper.py #32

feat: add type hint for _get_linker_entities function in app_helper.py

feat: add type hint for _get_linker_entities function in app_helper.py #32

Workflow file for this run

name: Build App
on:
push:
paths:
- "app/**"
jobs:
version:
concurrency: refs/notes/semantic-release
name: Release App
runs-on: ubuntu-latest
permissions:
contents: write # needed to write releases
outputs:
version: ${{ steps.appVersion.outputs.appVersion }}
if: |
(github.repository == 'sefaria/gpu-server')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Fetch entire history. Required for chart-releaser; see https://github.com/helm/chart-releaser-action/issues/13#issuecomment-602063896
fetch-depth: 0
- name: fetch head of branch to ensure semantic can run
run: git pull origin $GITHUB_REF
- name: setup release rules
run: app/release-rules.sh
- uses: cycjimmy/semantic-release-action@v4
id: semantic
with:
working_directory: ./app
semantic_version: 24.2.7
extra_plugins: |
conventional-changelog-conventionalcommits
semantic-release-monorepo
@semantic-release/github
@semantic-release/release-notes-generator
@semantic-release/commit-analyzer
extends: |
semantic-release-monorepo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: check version was generated
id: appVersion
run: |
if [[ -z "${{ steps.semantic.outputs.new_release_version }}" ]]; then
if [[ -z "$(git tag --points-at HEAD -l 'v*')" ]]; then
echo "No release version available"
exit 1
else
echo "appVersion=$(git tag --points-at HEAD -l 'v*')" >> $GITHUB_OUTPUT
fi
else
echo "appVersion=${{ steps.semantic.outputs.new_release_version }}" >> $GITHUB_OUTPUT
fi
- name: "Version Info:"
run: echo "${{ steps.appVersion.outputs.appVersion }}"
build:
runs-on: ubuntu-latest
needs: version
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.release.output.version }}
- name: Free up disk space
uses: jlumbroso/free-disk-space@main
with:
# Remove large packages that aren't needed for Docker builds
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: false
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- id: auth
name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
token_format: 'access_token'
workload_identity_provider: 'projects/${{ secrets.GCP_PROJECT_ID}}/locations/global/workloadIdentityPools/github/providers/github'
service_account: '${{ secrets.GCP_SA }}'
- name: Login to GAR
uses: docker/login-action@v3
with:
registry: us-east1-docker.pkg.dev
username: oauth2accesstoken
password: '${{ steps.auth.outputs.access_token }}'
- name: Get current date
id: date
run: echo "date=$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
- name: Generate image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT }}/containers/ner-server
tags: |
type=ref,event=tag
type=sha,enable=true,priority=100,prefix=sha-,suffix=-${{ steps.date.outputs.date }},format=short
type=sha
type=semver,pattern={{raw}},value=${{ needs.version.outputs.version}}
flavor: |
latest=true
- name: build and push
uses: docker/build-push-action@v5
with:
context: ./app
push: true
file: ./app/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}