feature: handle single address for faucet, handle send token from holder itself if distributor is empty #340
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: Starship Docker | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
paths: | |
- "starship/registry/**" | |
- "starship/exposer/**" | |
- "starship/faucet/**" | |
- ".github/workflows/starship-docker.yaml" | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "starship/registry/**" | |
- "starship/exposer/**" | |
- "starship/faucet/**" | |
- ".github/workflows/starship-docker.yaml" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-starship-docker | |
cancel-in-progress: true | |
jobs: | |
deploy-docker: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
strategy: | |
matrix: | |
type: [ "registry", "exposer", "faucet" ] | |
fail-fast: false | |
defaults: | |
run: | |
working-directory: starship | |
env: | |
DOCKER_REPO: ghcr.io/cosmology-tech/starship | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
src: | |
- 'starship/${{ matrix.type }}/**' | |
- name: Set up QEMU | |
if: steps.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
if: steps.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
if: steps.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Determine tag | |
if: steps.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' | |
id: docker-tag | |
run: | | |
tag=$(date -u "+%Y%m%d")-$(echo ${GITHUB_SHA} | cut -c1-7) | |
echo Tag will be $tag | |
echo ::set-output name=version::$tag | |
- name: Build and push | |
if: steps.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' | |
uses: docker/build-push-action@v4 | |
with: | |
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
context: starship/${{ matrix.type }}/ | |
tags: ghcr.io/cosmology-tech/starship/${{ matrix.type }}:${{ steps.docker-tag.outputs.version }} | |
platforms: linux/amd64,linux/arm64 |