Patch macros guard #210
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: c2wasm-api to Heroku CD | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
#set environment variables | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
APP_NAME: ${{ 'xrpl-c2wasm-api' }} | |
jobs: | |
build: | |
name: Test build image | |
runs-on: ubuntu-18.04 | |
steps: | |
# Clone the repository | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# - name: SSH Debug | |
# uses: lhotari/action-upterm@v1 | |
- name: Download bin.zip | |
uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
repo: "XRPLF/xrpl-hooks-compiler" | |
version: "tags/v1.25" | |
file: "bin.zip" | |
target: "./bin.zip" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# Uncomment this if you want to debug pipeline | |
# - name: SSH Debug | |
# uses: lhotari/action-upterm@v1 | |
- name: Unzip binaries | |
run: | | |
unzip -o bin.zip | |
- name: Local build | |
run: | | |
cd docker | |
make dependencies | |
docker build . --tag web | |
# Build Docker image | |
- name: Docker build | |
if: success() && contains('refs/heads/master', github.ref) | |
run: docker login --username=_ --password=$HEROKU_API_KEY registry.heroku.com | |
# Push the Docker image to Heroku Container Registry | |
- name: Publish | |
if: success() && contains('refs/heads/master', github.ref) | |
run: | | |
cd docker | |
make dependencies | |
heroku container:push web -a $APP_NAME | |
make clean | |
heroku container:release web -a $APP_NAME |