-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (49 loc) · 1.52 KB
/
docker_build_indexer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build Indexer Docker and deploy
on:
push:
branches:
- main
workflow_dispatch:
release:
types: [ published ]
defaults:
run:
working-directory: starcoin-indexer
jobs:
build-starcoin-docker:
name: build starcoin-indexer docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: recursive
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: starcoin/starcoin_indexer
tag-sha: true
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
driver: docker
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v18
with:
repositories: '[{ "id": "github", "url": "https://maven.pkg.github.com/starcoinorg/*" }]'
servers: '[{ "id": "github", "username": "${{ github.actor }}", "password": "${{ secrets.GIT_PACKAGE_TOKEN }}" }]'
output_file: settings.xml
- name: Build and push
uses: docker/[email protected]
with:
context: .
file: starcoin-indexer/deploy/Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}