Skip to content

output all test variables #29

output all test variables

output all test variables #29

Workflow file for this run

name: CI_package
on:
pull_request:
jobs:
debug info:

Check failure on line 5 in .github/workflows/ci_bundle.yml

View workflow run for this annotation

GitHub Actions / CI_package

Invalid workflow file

The workflow is not valid. .github/workflows/ci_bundle.yml (Line: 5, Col: 3): The identifier 'debug info' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters. .github/workflows/ci_bundle.yml (Line: 29, Col: 9): Unexpected symbol: '"no_skip"'. Located at position 15 within expression: github.ref == "no_skip"
runs-on: ubuntu-latest
steps:
- name: first ${{ github.head_ref }}
run: echo ${{ github }}
- name: needs
run: echo ${{ needs }}
- name: strategy
run: echo ${{ strategy }}
- name: matrix
run: echo ${{ matrix }}
- name: job
run: echo ${{ job }}
- name: runner
run: echo ${{ runner }}
- name: env
run: echo ${{ env }}
- name: vars
run: echo ${{ vars }}
- name: steps
run: echo ${{ steps }}
- name: inputs
run: echo ${{ inputs }}
tag-version:
if: github.ref == "no_skip"
# if: (github.ref == "coucou")github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: checkout ${{ github.head_ref }}
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- run: git status
- run: git rev-parse --abbrev-ref HEAD
- name: tag ${{ github.head_ref }}
run: |
git tag $(git rev-parse --abbrev-ref HEAD)_CI_$(git rev-parse --short HEAD)
git push --tags
lux-package:
# the combination (if always) + (needs tag-version) makes sure the lux-package job runs
# after completion of the tag-version job.
# In case of a tag push, the tag-version job is skipped but the lux-package job will run
# In case of a closed PR, the tag-version job runs first, the lux-package job runs after completion
if: github.ref == "no_skip"
# if: ${{ always() }}
needs: tag-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
persist-credentials: false
fetch-depth: 0
- name: compute tag name
shell: bash
run: |
at=$(git rev-parse --abbrev-ref HEAD)_CI_$(git rev-parse --short HEAD)
echo "AUTO_TAG=$at" >> $GITHUB_ENV
- name: create release
id: create_release
uses: octokit/request-action@v2.x
with:
# secrets.GITHUB_TOKEN is a secret only valid for one CI execution
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
route: POST /repos/{owner}/{repo}/releases
owner: 'Geoportail-Luxembourg'
repo: 'luxembourg-geoportail'
tag_name: ${{ github.event_name == 'push' && github.ref || env.AUTO_TAG }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Build and pack prod library
shell: bash
run: |
npm ci
npm run build:lib:prod
npm pack
- name: upload manually
run: |
project_name=$(npm run env | grep "npm_package_name" | sed s/npm_package_name=//)
pkg_name=$(ls $project_name-*)
lib_name=$(echo $pkg_name | sed s/luxembourg-geoportail-/luxembourg-geoportail-lib-/)
curl -X POST "https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$lib_name" --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/octet-stream" --data-binary "@$pkg_name"
env:
owner: 'Geoportail-Luxembourg'
repo: 'luxembourg-geoportail'
id: ${{ fromJSON(steps.create_release.outputs.data).id }}