Added updated Mojaloop license #24
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: Publish image | |
on: | |
release: | |
types: [published] | |
push: | |
branches: | |
- '**' | |
pull_request: | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Assert package.json version matches release tag | |
if: ${{ github.event_name == 'release' }} | |
run: |- | |
PACKAGE_VER="v$(jq -r '.version' package.json)" | |
echo "$PACKAGE_VER" | |
echo "$GITHUB_REF" | |
[[ "refs/tags/$PACKAGE_VER" == "$GITHUB_REF" ]] | |
- | |
name: Docker meta | |
id: docker_meta | |
uses: crazy-max/ghaction-docker-meta@v1 | |
with: | |
images: | | |
ghcr.io/${{ github.repository }} | |
# For a release v1.2.3, we'll produce the following image tags | |
# v1.2.3 | |
# 1.2.3 | |
# 1.2 | |
# latest | |
# Semver pre-release versions are also supported | |
# See also: | |
# https://github.com/crazy-max/ghaction-docker-meta/tree/0a412843f87333854fa03a809b74056b64c6f31a#handle-semver-tag | |
tag-semver: | | |
{{raw}} | |
{{version}} | |
{{major}}.{{minor}} | |
label-custom: | | |
org.opencontainers.image.source=https://github.com/${{ github.repository }}/tree/${{ github.sha }} | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- | |
name: Login to GitHub Container Registry | |
if: ${{ github.event_name == 'release' }} | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2.2.1 | |
with: | |
push: ${{ github.event_name == 'release' }} | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
- | |
name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |