Skip to content

Commit 1581b5c

Browse files
committed
ci: test before pushing
1 parent d915f13 commit 1581b5c

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

.github/workflows/alpine-master.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ on:
99
- 'master/alpine/docker-entrypoint.sh'
1010

1111
env:
12+
CONTEXT: master/alpine
1213
REGISTRY_IMAGE: bitcoin/bitcoin
1314
TAGS: master-alpine
14-
CONTEXT: master/alpine
15+
TEST_TAG: master-test-alpine
1516

1617
jobs:
1718
build:
@@ -53,6 +54,19 @@ jobs:
5354
with:
5455
create-symlink: true
5556

57+
- name: Build and export to Docker
58+
uses: docker/build-push-action@v6
59+
with:
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max
62+
context: ${{ env.CONTEXT }}
63+
load: true
64+
tags: ${{ env.TEST_TAG }}
65+
66+
- name: Test
67+
run: |
68+
docker run --rm ${{ env.TEST_TAG }} bitcoind --version
69+
5670
- name: Build and push Docker image
5771
id: build
5872
uses: docker/build-push-action@v6
@@ -69,10 +83,6 @@ jobs:
6983
VCS_REF=${{ github.sha }}
7084
outputs: type=image,push-by-digest=true,name-canonical=true
7185

72-
- name: Test bitcoind
73-
run: |
74-
docker run --rm --platform ${{ matrix.platform.docker }} ${{ steps.build.outputs.imageid }} bitcoind --version
75-
7686
- name: Export digest
7787
run: |
7888
mkdir -p ${{ runner.temp }}/digests

.github/workflows/debian-master.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ on:
99
- 'master/docker-entrypoint.sh'
1010

1111
env:
12+
CONTEXT: master
1213
REGISTRY_IMAGE: bitcoin/bitcoin
1314
TAGS: master
14-
CONTEXT: master
15+
TEST_TAG: master-test
1516

1617
jobs:
1718
build:
@@ -53,6 +54,19 @@ jobs:
5354
with:
5455
create-symlink: true
5556

57+
- name: Build and export to Docker
58+
uses: docker/build-push-action@v6
59+
with:
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max
62+
context: ${{ env.CONTEXT }}
63+
load: true
64+
tags: ${{ env.TEST_TAG }}
65+
66+
- name: Test
67+
run: |
68+
docker run --rm ${{ env.TEST_TAG }} bitcoind --version
69+
5670
- name: Build and push Docker image
5771
id: build
5872
uses: docker/build-push-action@v6
@@ -69,10 +83,6 @@ jobs:
6983
VCS_REF=${{ github.sha }}
7084
outputs: type=image,push-by-digest=true,name-canonical=true
7185

72-
- name: Test bitcoind
73-
run: |
74-
docker run --rm --platform ${{ matrix.platform.docker }} ${{ steps.build.outputs.imageid }} bitcoind --version
75-
7686
- name: Export digest
7787
run: |
7888
mkdir -p ${{ runner.temp }}/digests

0 commit comments

Comments
 (0)