Skip to content

Commit f3cab3c

Browse files
committed
defaulted to share the docker image in the same job due to the workflow_run reqs
1 parent 851bb80 commit f3cab3c

File tree

1 file changed

+37
-7
lines changed

1 file changed

+37
-7
lines changed

.github/workflows/hive.yaml

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,49 @@
11
# Runs the specified hive testing suites
22
name: Hive
33
on:
4-
workflow_run:
5-
workflows: [Docker]
6-
types:
7-
- completed
4+
merge_group:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: ["**"]
9+
paths-ignore:
10+
- "README.md"
11+
- "LICENSE"
12+
- "**/README.md"
13+
- "**/docs/**"
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
818

919
env:
1020
RUST_VERSION: 1.80.1
1121

1222
jobs:
23+
docker-build:
24+
name: Build and Upload image
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
- name: Build Docker image
31+
uses: docker/build-push-action@v5
32+
with:
33+
context: .
34+
file: ./Dockerfile
35+
load: true
36+
tags: ethereum_rust
37+
outputs: type=docker,dest=/tmp/ethereum_rust_image.tar
38+
- name: Upload artifacts
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: ethereum_rust_image
42+
path: /tmp/ethereum_rust_image.tar
43+
1344
run-hive:
14-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1545
name: ${{ matrix.name }}
46+
needs: docker-build
1647
runs-on: ubuntu-latest
1748
strategy:
1849
matrix:
@@ -36,9 +67,8 @@ jobs:
3667
- name: Download artifacts
3768
uses: actions/download-artifact@v4
3869
with:
39-
run-id: ${{ github.event.workflow_run.id }}
4070
name: ethereum_rust_image
41-
github-token: ${{ secrets.GITHUB_TOKEN }}
71+
path: /tmp
4272
- name: Load image
4373
run: |
4474
docker load --input /tmp/ethereum_rust_image.tar

0 commit comments

Comments
 (0)