Skip to content

Blockcore Hub (0.0.11) #14

Blockcore Hub (0.0.11)

Blockcore Hub (0.0.11) #14

Workflow file for this run

name: Build and Release Docker Image
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Log Variables
run: |
echo "action - ${{ github.event.action }}"
echo "url - ${{ github.event.release.url }}"
echo "assets_url - ${{ github.event.release.assets_url }}"
echo "id - ${{ github.event.release.id }}"
echo "tag_name - ${{ github.event.release.tag_name }}"
echo "assets - ${{ github.event.assets }}"
echo "assets[0] - ${{ github.event.assets[0] }}"
- name: Download release
uses: sondreb/action-release-download@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
url: ${{ github.event.release.assets_url }}
folder: "./artifacts/"
- name: Extract asset and copy
run: |
mkdir ./src/
tar -C ./src/ -xzvf ./artifacts/blockcore-hub-${{ github.event.release.tag_name }}.tgz --strip-components=1
ls -R
- name: Install and Build
working-directory: app
run: |
npm ci --force
npm run build
- name: Build the Docker container image
run: docker build srv/. -t blockcore/blockcore-hub:latest -t blockcore/blockcore-hub:${{ github.event.release.tag_name }}
- name: Login and Push to Docker Registry
run: |
docker login -u "sondreb" -p "${{secrets.DOCKER_KEY}}"
docker push --all-tags blockcore/blockcore-hub