Skip to content

Commit a27c202

Browse files
Merge pull request #137 from paritytech/as-ci-docker
[ci] Build docker image on self-hosted runners
2 parents 079e7a1 + 612315a commit a27c202

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

.github/workflows/build-docker.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Action checks that the docker image can be built
2+
# It doesn't push the image to the registry
3+
name: Build Docker image
4+
5+
on:
6+
push:
7+
branches:
8+
- release-**
9+
pull_request:
10+
types: [opened, synchronize, reopened, ready_for_review]
11+
12+
# Disable previous runs
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
push_to_registry:
19+
name: Push Docker image to Docker Hub
20+
runs-on: arc-runners-project-mythical
21+
steps:
22+
- name: Check out the repo
23+
uses: actions/checkout@v4
24+
25+
- name: Extract metadata (tags, labels) for Docker
26+
id: meta
27+
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
28+
with:
29+
images: "paritypr/project-mythical"
30+
31+
- name: Build docker image
32+
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 #v5.0.0
33+
with:
34+
file: docker/Dockerfile
35+
build-args: environment="testnet"
36+
push: false
37+
tags: ${{ steps.meta.outputs.tags }}
38+
labels: ${{ steps.meta.outputs.labels }}
File renamed without changes.

.github/workflows/publish-docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
push_to_registry:
1616
name: Push Docker image to Docker Hub
17-
runs-on: ubuntu-latest
17+
runs-on: arc-runners-project-mythical
1818
steps:
1919
- name: Check out the repo
2020
uses: actions/checkout@v4

0 commit comments

Comments
 (0)