Blockcore Market (0.0.16) #18
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 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-market-${{ github.event.release.tag_name }}.tgz --strip-components=1 | |
ls -R | |
- name: Install and Build | |
working-directory: app | |
run: | | |
npm ci | |
npm run build | |
- name: Build the Docker container image | |
run: docker build server/. -t blockcore/market:latest -t blockcore/market:${{ 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/market |