Skip to content

Bump @stoplight/elements from 8.0.0 to 8.0.1 #89

Bump @stoplight/elements from 8.0.0 to 8.0.1

Bump @stoplight/elements from 8.0.0 to 8.0.1 #89

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
tags:
- '*'
env:
DOCKER_BUILDKIT: 1
DOCKER_BUILDKIT_INLINE_CACHE: 1
DOCKER_IMAGE_NAME: skriptfabrik/elements-cli
jobs:
publish-push:
name: Publish package and Push Docker images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node.js version ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: |-
npm ci
- name: Export short SHA
run: |-
echo "GITHUB_SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-8)" >> ${GITHUB_ENV}
- name: Set package version
if: github.ref_name == 'main'
run: |-
PACKAGE_VERSION=$(jq -r .version package.json)
npm version "${PACKAGE_VERSION%-*}-${GITHUB_SHORT_SHA}" --no-git-tag-version
- name: Set package version from Git
if: github.ref_type == 'tag'
run: |-
npm version from-git --no-git-tag-version
- name: Publish package
uses: JS-DevTools/npm-publish@v3
if: github.ref_type == 'tag'
with:
access: public
token: ${{ secrets.NPM_TOKEN }}
- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push latest Docker image
if: github.ref_name == 'main'
uses: docker/build-push-action@v5
with:
build-args: |-
BUILDKIT_INLINE_CACHE=${{ env.DOCKER_BUILDKIT_INLINE_CACHE }}
ELEMENTS_CLI_VERSION=${{ env.GITHUB_SHORT_SHA }}
cache-from: type=registry,ref=${{ env.DOCKER_IMAGE_NAME }}:latest
context: .
platforms: |-
linux/amd64
linux/arm64
pull: true
push: true
tags: |-
${{ env.DOCKER_IMAGE_NAME }}:latest
- name: Export release version
if: github.ref_type == 'tag'
run: |-
echo "RELEASE_VERSION=${GITHUB_REF_NAME}" >> ${GITHUB_ENV}
- name: Build and Push Docker image release version
if: github.ref_type == 'tag'
uses: docker/build-push-action@v5
with:
build-args: |-
BUILDKIT_INLINE_CACHE=${{ env.DOCKER_BUILDKIT_INLINE_CACHE }}
ELEMENTS_CLI_VERSION=v${{ env.RELEASE_VERSION }}
cache-from: type=registry,ref=${{ env.DOCKER_IMAGE_NAME }}:latest
context: .
platforms: |-
linux/amd64
linux/arm64
pull: true
push: true
tags: |-
${{ env.DOCKER_IMAGE_NAME }}:${{ env.RELEASE_VERSION }}