forked from latticexyz/mud
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: workflow for building and deploying docker img to caprover
- Loading branch information
1 parent
5e12f18
commit ffff77c
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build and Deploy Chaquer Indexer to Caprover | ||
|
||
on: | ||
push: workflow_dispatch | ||
|
||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest-16-cores | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: 'arm64,arm' | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Preset Image Name | ||
run: echo "IMAGE_URL=$(echo ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:$(echo ${{ github.sha }} | cut -c1-7) | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | ||
|
||
- name: Build and push Docker Image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ env.IMAGE_URL }} | ||
|
||
- name: Deploy Image to CapRrover | ||
uses: caprover/deploy-from-github@v1.1.2 | ||
with: | ||
server: "${{ secrets.CAP_SERVER }}" | ||
app: "${{ secrets.APP_NAME }}" | ||
token: "${{ secrets.APP_TOKEN }}" | ||
image: ${{ env.IMAGE_URL }} |