Skip to content

Commit

Permalink
Merge branch 'main' into feat.fallbackjson
Browse files Browse the repository at this point in the history
  • Loading branch information
mhosken committed Aug 30, 2024
2 parents 1ab9f4d + 1e27c27 commit dbf5902
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Prune images
on:
workflow_run:
workflows: [Staging]
workflows: [Build and deploy]
types: [completed]

jobs:
prune:
runs-on: ubuntu-latest
steps:
- name: prune
uses: vlaurin/action-ghcr-prune@v0.5.0
uses: vlaurin/action-ghcr-prune@v0.6.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
organization: silnrsi
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.release && 'release' || 'main' }}

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

# Login against a Docker registry except on PR
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -42,7 +44,7 @@ jobs:
# Extract metadata (tags, labels) for Docker
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand All @@ -54,7 +56,7 @@ jobs:
# Build and push Docker image with Buildx (don't push on PR)
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand All @@ -72,7 +74,7 @@ jobs:
url: https://lff${{ (github.event.client_payload.release || endsWith(github.ref, '/release')) && '.api' || '' }}.languagetechnology.org/docs
steps:
- name: Deploy to ${{ (github.event.client_payload.release || endsWith(github.ref, '/release')) && 'production' || 'staging' }}
uses: distributhor/workflow-webhook@v3.0.7
uses: distributhor/workflow-webhook@v3
with:
webhook_url: ${{ secrets.DEPLOY_WEBHOOK_URL }}
webhook_secret: ${{ secrets.DEPLOY_KEY }}

0 comments on commit dbf5902

Please sign in to comment.