chore: test 13 #166
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 }} | |
- run: pwd && cat test_version1.txt | |
- name: run command if new release published | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: sed -i "s/ESI_SHELL_VERSION=.*/ESI_SHELL_VERSION=${{ steps.semantic.outputs.new_release_version }}-$(git rev-parse --short HEAD)/g" esi-shell | |
- name: run command if new release NOT published | |
if: steps.semantic.outputs.new_release_published == 'false' | |
run: sed -i "s/ESI_SHELL_VERSION=.*/ESI_SHELL_VERSION=${{ steps.semantic.outputs.last_release_version }}-$(git rev-parse --short HEAD)/g" esi-shell | |
- run: grep ESI_SHELL_VERSION esi-shell | |
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 }} |