Skip to content

action: use elastic/apm-pipeline-library/.github/actions/updatecli (#… #20

action: use elastic/apm-pipeline-library/.github/actions/updatecli (#…

action: use elastic/apm-pipeline-library/.github/actions/updatecli (#… #20

Workflow file for this run

---
# Takes the version of elastic-apm-node in the package-lock.json file and creates a tag
# if the tag does not exist yet.
name: create-tag
on:
push:
branches:
- main
permissions:
contents: write
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # also fetch tags
- run: |
ELASTIC_APM_NODE_VERSION="v$(jq -r '.dependencies."elastic-apm-node".version' package-lock.json)"
# if the tag does not exist
if [[ ! $(git tag -l "${ELASTIC_APM_NODE_VERSION}") ]]; then
git tag ${ELASTIC_APM_NODE_VERSION}
git push origin "refs/tags/${ELASTIC_APM_NODE_VERSION}"
fi