Skip to content

Commit 7395090

Browse files
authored
Use docker action for build (#29)
1 parent ea9946c commit 7395090

File tree

1 file changed

+4
-33
lines changed

1 file changed

+4
-33
lines changed

.github/workflows/docker.yaml

+4-33
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,7 @@ on:
99

1010
jobs:
1111
package:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v4
15-
16-
- name: Set up Docker Buildx
17-
uses: docker/setup-buildx-action@v2
18-
19-
- name: Login to GitHub Container Registry
20-
uses: docker/login-action@v2
21-
with:
22-
registry: ghcr.io
23-
username: ${{ github.actor }}
24-
password: ${{ github.token }}
25-
26-
- name: Docker meta
27-
id: meta
28-
uses: docker/metadata-action@v4
29-
with:
30-
images: |
31-
ghcr.io/${{ github.repository }}
32-
# generate Docker tags based on the following events/attributes
33-
# latest is only tagged if we're on the default branch
34-
tags: |
35-
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
36-
type=sha,format=long
37-
38-
- name: Build Docker Container
39-
uses: docker/build-push-action@v3
40-
with:
41-
context: .
42-
platforms: linux/amd64
43-
push: true
44-
tags: ${{ steps.meta.outputs.tags }}
12+
uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main
13+
with:
14+
push: ${{ github.event_name != 'pull_request' }}
15+
docker-platforms: linux/amd64

0 commit comments

Comments
 (0)