Skip to content

Commit a54f0ea

Browse files
committed
Merge branch 'main' of github.com:initia-labs/miniwasm
2 parents 414c285 + 448cb0c commit a54f0ea

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/docker-indexer.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Docker-Indexer
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- "indexer"
8+
tags:
9+
- "v*-indexer"
10+
paths:
11+
- "**.go"
12+
- "go.mod"
13+
- "go.sum"
14+
pull_request:
15+
branches:
16+
- "indexer"
17+
paths:
18+
- "**.go"
19+
- "go.mod"
20+
- "go.sum"
21+
22+
env:
23+
REGISTRY: ghcr.io
24+
IMAGE_NAME: miniwasm-indexer
25+
26+
jobs:
27+
minitiad-indexer:
28+
name: Minitiad-Indexer
29+
runs-on: ubuntu-latest
30+
permissions:
31+
contents: read
32+
packages: write
33+
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v3
37+
38+
- name: Log in to the Container registry
39+
uses: docker/login-action@v2
40+
with:
41+
registry: ${{ env.REGISTRY }}
42+
username: ${{ github.actor }}
43+
password: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: Extract metadata (tags, labels) for Docker
46+
id: meta
47+
uses: docker/metadata-action@v4
48+
with:
49+
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
50+
51+
- name: Build and push
52+
uses: docker/build-push-action@v4
53+
with:
54+
build-args: "GITHUB_ACCESS_TOKEN=${{ secrets.GH_READ_TOKEN }}"
55+
file: images/private/Dockerfile
56+
push: ${{ startsWith(github.ref, 'refs/tags') }} # push image only for tags
57+
tags: ${{ steps.meta.outputs.tags }}
58+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)