Skip to content

Commit

Permalink
fix deploy CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
willcl-ark committed Aug 15, 2024
1 parent 855e6ee commit 18ac4ab
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: deploy

on:
workflow_run:
workflows: ["test"]
Expand All @@ -9,8 +8,7 @@ on:
jobs:
deploy-to-dockerhub:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.conclusion == 'success'
if: github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
Expand All @@ -31,29 +29,29 @@ jobs:
org.opencontainers.image.title=warnet-rpc
org.opencontainers.image.description=Warnet RPC server
- name: Login to Docker Hub
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push production RPC image
- name: Build production RPC image
uses: docker/build-push-action@v5
with:
file: resources/images/rpc/Dockerfile_prod
platforms: linux/amd64,linux/arm64
context: resources/images/rpc
push: true
context: .
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push dev RPC image
if: github.ref == 'refs/heads/main'
- name: Build dev RPC image
uses: docker/build-push-action@v5
with:
file: resources/images/rpc/Dockerfile_dev
platforms: linux/amd64,linux/arm64
context: resources/images/rpc
push: true
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_RPC_REPO }}:dev
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down

0 comments on commit 18ac4ab

Please sign in to comment.