made changes for language input #35
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: Create and publish a Docker image | |
on: | |
push: | |
branches: | |
- "main" | |
paths-ignore: | |
- "**.md" | |
- "docker-compose.yml" | |
- "docker-compose.dev.yml" | |
- ".github/ISSUE_TEMPLATE/*.yml" | |
- ".github/dependabot.yml" | |
pull_request: | |
branches: | |
- "main" | |
paths-ignore: | |
- "**.md" | |
- "docker-compose.yml" | |
- "docker-compose.dev.yml" | |
- ".github/ISSUE_TEMPLATE/*.yml" | |
- ".github/dependabot.yml" | |
workflow_dispatch: | |
release: | |
types: [published, edited] | |
jobs: | |
build-and-publish-image: | |
runs-on: ubuntu-latest | |
environment: 05a580ce02c1b4b40b081cc9f6e028 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Docker metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
ghcr.io/${{ github.repository }} | |
tags: | | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}} | |
type=semver,pattern={{major}}.{{minor}} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Publish Docker Image | |
uses: docker/build-push-action@v4 | |
id: build-push | |
with: | |
context: . | |
push: ${{ github.event_name != 'pull_request' }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Set container SHA | |
id: set-container-sha | |
run: | | |
echo "::set-output name=CONTAINER_SHA::${{ steps.build-push.outputs.digest }}" | |
echo $CONTAINER_SHA | |
- uses: paperspace/[email protected] | |
name: Deploy to Paperspace | |
id: deploy | |
env: | |
PAPERSPACE_API_KEY: 05a580ce02c1b4b40b081cc9f6e028 | |
CONTAINER_SHA: ${{ steps.set-container-sha.outputs.CONTAINER_SHA }} | |
with: | |
projectId: pioiimjvdsx | |
configPath: /../.paperspace/app.yaml | |
image: ghcr.io/${{ github.repository }}:latest@${{ steps.build-push.outputs.digest }} |