test #41
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/CD pipeline | |
on: | |
push: | |
branches: | |
- unicorn-pipe-rel2 | |
# pull_request: {} | |
workflow_dispatch: {} | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
check-unicorn: | |
name: Check if app is on unicorn track | |
runs-on: ec2-runners | |
container: | |
image: public.ecr.aws/m3u4c4h9/island-is/actions-runner-public:latest | |
timeout-minutes: 35 | |
outputs: | |
IS_UNICORN: ${{ steps.unicorn-affected.outputs.IS_UNICORN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get cache | |
id: get-cache | |
uses: ./.github/actions/get-cache | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
enable-cache: 'node_modules,generated-files' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'package.json' | |
- name: Setup yarn | |
run: corepack enable | |
- name: Check unicorn affected | |
id: unicorn-affected | |
run: | | |
node scripts/ci/unicorn-utils.mjs | |
UNICORN=$(node scripts/ci/unicorn-utils.mjs) | |
if [ "$UNICORN" == 'true' ]; then | |
echo "unicorn is detected" | |
echo IS_UNICORN=true >> "$GITHUB_OUTPUT" | |
else | |
echo "No unicorn" | |
echo IS_UNICORN=false >> "$GITHUB_OUTPUT" | |
fi | |
- name: Create release branch | |
if: ${{ steps.unicorn-affected.outputs.IS_UNICORN == 'true' }} | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
run: | | |
node scripts/ci/create-release.mjs $PR_NUMBER | |