chore(deps-dev): bump gh-pages from 3.2.3 to 5.0.0 #296
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: CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: ['19', '18', '16', '14'] | |
os: ['windows-latest', 'ubuntu-latest', 'macos-latest'] | |
runs-on: ${{ matrix.os }} | |
name: Node ${{ matrix.node-version }} sample (${{ matrix.os }}) | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get NPM Cache Directory | |
id: npm-cache | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- name: Cache NPM | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.npm-cache.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install NPM Dependencies | |
run: npm ci | |
- name: Setup Python for Github-Markup | |
if: ${{ runner.os != 'Windows' }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install docutils for Github-Markup | |
if: ${{ runner.os != 'Windows' }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install docutils | |
- name: Setup Licensee, Linguist, and Github-Markup Dependencies (MacOS) | |
if: ${{ runner.os == 'macOS' }} | |
run: brew install cmake pkg-config icu4c libidn | |
- name: Setup Licensee, Linguist, and Github-Markup Dependencies (Linux) | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential libicu-dev libcurl4-openssl-dev libldap2-dev libidn11-dev | |
- name: Setup Ruby | |
if: ${{ runner.os != 'Windows' }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1.4' | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Run Test | |
if: ${{ runner.os != 'Windows' }} | |
run: bundle exec npm test | |
- name: Run Test (Windows) | |
if: ${{ runner.os == 'Windows' }} | |
run: npm test | |
test-docker: | |
runs-on: ubuntu-latest | |
name: Docker sample | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Docker Build | |
uses: docker/build-push-action@v2 | |
with: | |
tags: todogroup/repolinter:latest | |
load: true | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
- name: Docker Run | |
run: docker run -t -v ${{ github.workspace }}:/src -w /src todogroup/repolinter:latest . | |
publish-release: | |
name: Publish a Release | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
needs: [test, test-docker] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Semantic Release | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v2 | |
with: | |
extra_plugins: | | |
@semantic-release/git | |
@semantic-release/changelog | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Cache Docker layers | |
if: steps.semantic.outputs.new_release_published == 'true' | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Set up Docker Buildx | |
if: steps.semantic.outputs.new_release_published == 'true' | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to GitHub Container Registry | |
if: steps.semantic.outputs.new_release_published == 'true' | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Gather Docker Labels | |
if: steps.semantic.outputs.new_release_published == 'true' | |
id: docker_meta | |
uses: crazy-max/ghaction-docker-meta@v2 | |
with: | |
images: ghcr.io/${{ github.repository }} | |
- name: Build and Push to GitHub Container Registry | |
if: steps.semantic.outputs.new_release_published == 'true' | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
tags: >- | |
ghcr.io/${{ github.repository }}:latest, | |
ghcr.io/${{ github.repository }}:v${{ steps.semantic.outputs.new_release_major_version }}.${{ steps.semantic.outputs.new_release_minor_version }}, | |
ghcr.io/${{ github.repository }}:v${{ steps.semantic.outputs.new_release_major_version }}.${{ steps.semantic.outputs.new_release_minor_version }}.${{ steps.semantic.outputs.new_release_patch_version }} |