v0.33.0.3 #64
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
# SPDX-FileCopyrightText: 2022 Alliander N.V. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Release Project | |
on: | |
release: | |
types: [released] | |
jobs: | |
push_to_registry: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache Docker Register | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }} | |
- name: Extract tag name | |
id: extract_tagname | |
shell: bash | |
# Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>. | |
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})" | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Use Node.js 14.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14.x' | |
- name: Build application with npm | |
run: | | |
npm ci | |
npm run-script build | |
- name: Build and push docker image to Docker Hub | |
uses: docker/build-push-action@v4 | |
with: | |
# Set the context to use the current directory and not execute it's own git checkout. | |
context: . | |
push: true | |
# Tag the images using the tagname and also latest. | |
tags: | | |
lfenergy/compas-open-scd:${{ steps.extract_tagname.outputs.tagname }} | |
lfenergy/compas-open-scd:latest |