-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add example workflow to publish docker images
- Loading branch information
1 parent
fcbe60f
commit 2a28506
Showing
4 changed files
with
67 additions
and
7 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,56 @@ | ||
name: Publish Docker images | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push_fullnode_to_registry: | ||
name: Push fullnode Docker image to fly.io | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🔑 Fly Registry Auth | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: registry.fly.io | ||
username: x | ||
password: ${{ secrets.FLY_API_TOKEN }} | ||
|
||
- name: 🐳 Docker build (fullnode) | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./fullnode.Dockerfile | ||
push: true | ||
tags: registry.fly.io/cartezcash-fullnode:latest | ||
build-args: | | ||
COMMIT_SHA=${{ github.sha }} | ||
push_cartesi_node_to_registry: | ||
name: Push cartesi node Docker image to fly.io | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🔑 Fly Registry Auth | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: registry.fly.io | ||
username: x | ||
password: ${{ secrets.FLY_API_TOKEN }} | ||
|
||
- name: Setup Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Install Sunodo and build | ||
run: | | ||
npm install -g @sunodo/cli | ||
IMAGE_TAG=$(sunodo deploy build --platform linux/amd64 | grep "Application node Docker image" | awk '{print $NF}') | ||
docker push $IMAGE_TAG:registry.fly.io/cartezcash:latest |
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
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
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