Build Indexer Docker and deploy #127
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |