Skip to content

Commit

Permalink
ci: move publish release docker image to GHA (#1927)
Browse files Browse the repository at this point in the history
Co-authored-by: Javier Viola <363911+pepoviola@users.noreply.github.com>
  • Loading branch information
alvicsam and pepoviola authored Dec 10, 2024
1 parent 1c8fd0f commit 331abff
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 27 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,10 @@ env:
GHA_CLUSTER_SERVER_ADDR: "https://kubernetes.default:443"

jobs:
# build_image:
# name: Build image
# runs-on: ubuntu-latest
# timeout-minutes: 30
# steps:
# - name: Check out the repo
# uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0

# - name: npm build
# run: |
# cd javascript
# npm install
# npm dedupe
# npm run clean
# npm run build

# - name: Build Docker image
# uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
# with:
# file: ./scripts/ci/docker/zombienet_injected.Dockerfile
# context: .
# push: false
# tags: |
# ${{ env.IMAGE_NAME }}:${{ env.VERSION }}
# ${{ env.IMAGE_NAME }}:latest

build_push_image:
name: Build and Push Docker image to Docker Hub
runs-on: ubuntu-latest
timeout-minutes: 30
# needs: [build_image]
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,38 @@ jobs:
asset_path: ./javascript/bins/zombienet-macos-${{ matrix.target.arch }}
asset_name: zombienet-macos-${{ matrix.target.arch }}
asset_content_type: application/octet-stream
build_push_image:
name: Build and Push Docker image to Docker Hub
runs-on: ubuntu-latest
timeout-minutes: 30
environment: tags
env:
IMAGE_NAME: paritytech/zombienet
VERSION: ${{ github.ref_name }}
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0

- name: npm build
run: |
cd javascript
npm install
npm dedupe
npm run clean
npm run build
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Build Docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
file: ./scripts/ci/docker/zombienet_injected.Dockerfile
context: .
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
${{ env.IMAGE_NAME }}:latest

0 comments on commit 331abff

Please sign in to comment.