chore: test ver 5 #193
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: Release | |
on: | |
push: | |
branches: | |
- main | |
- beta | |
- betatest | |
jobs: | |
build-test-release: | |
runs-on: [gpu] | |
steps: | |
- name: Define environment variables | |
run: echo IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Important for Semantic Release to analyze all commits | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "lts/*" | |
- run: npm install @semantic-release/exec -D | |
- name: Create semantic release | |
uses: cycjimmy/semantic-release-action@v4 | |
id: semantic | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
deploy: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build-test-release | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- run: | | |
SEMVER=$(grep -Po '"version": "\K[^"]*' package.json) | |
sed -i "s/ESI_SHELL_VERSION=.*/ESI_SHELL_VERSION=${SEMVER}-$(git rev-parse --short HEAD)/g" esi-shell | |
- run: grep ESI_SHELL_VERSION esi-shell | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Build with Jekyll | |
uses: actions/jekyll-build-pages@v1 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
cleanup: | |
runs-on: ubuntu-latest | |
needs: build-test-release | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Delete untagged images | |
run: | | |
python -m pip install requests | |
.github/workflows/delete_untagged.py ${{ secrets.BNLNPPS_ESI_SHELL_PACKAGES_TOKEN }} |