Skip to content

add crop unlock offers and building offers #85

add crop unlock offers and building offers

add crop unlock offers and building offers #85

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]
workflow_dispatch:
env:
NODE_VERSION: 18.x
CLI_VERSION: 14.2.1
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
permissions:
contents: read
pages: write
id-token: write
packages: write
jobs:
install:
defaults:
run:
working-directory: ./tidal-harvest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: './tidal-harvest'
- run: npm install
# test:
# defaults:
# run:
# working-directory: tidal-harvest
# runs-on: ubuntu-latest
#
# strategy:
# matrix:
# Test: [Test,Lint]
#
# needs: install
#
# steps:
# - uses: actions/checkout@v3
# - name: Test (${{ matrix.Test }})
# uses: actions/setup-node@v3
# with:
# node-version: ${{ env.NODE_VERSION }}
# cache: 'npm'
# cache-dependency-path: './tidal-harvest'
# - run: npm link @angular/cli@${{ env.CLI_VERSION }}
# - if: ${{ matrix.Test == 'Lint' }}
# run: npm run test:lint
# - if: ${{ matrix.Test == 'Test' }}
# run: npm run test:test
build:
runs-on: ubuntu-latest
needs: install
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: './tidal-harvest'
- name: Cache build output
uses: actions/cache@v3
env:
cache-name: cache-dist
with:
path: ./tidal-harvest/dist/
key: ${{ runner.os }}-${{ github.run_id }}
- run: npm link @angular/cli@${{ env.CLI_VERSION }}
working-directory: tidal-harvest
- run: npm run build:${GITHUB_REF##*/}
working-directory: tidal-harvest
publish:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@7e0881f8fe90b25e305bbf0309761e9314607e25
with:
cosign-release: 'v1.9.0'
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Use cached build output
uses: actions/cache@v3
env:
cache-name: cache-dist
with:
path: ./tidal-harvest/dist/
key: ${{ runner.os }}-${{ github.run_id }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: ./tidal-harvest/
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Use cached build output
uses: actions/cache@v3
env:
cache-name: cache-dist
with:
path: ./tidal-harvest/dist/
key: ${{ runner.os }}-${{ github.run_id }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: './tidal-harvest/dist/tidal-harvest/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2