Skip to content

add a tag for the check #20

add a tag for the check

add a tag for the check #20

name: Create additional tags for each release
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Fetch all tags
run: git fetch --tags

Check failure on line 25 in .github/workflows/create_additional_release_tag.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/create_additional_release_tag.yaml

Invalid workflow file

You have an error in your yaml syntax on line 25
- name: Create additional tags
run: |
ARTIFACT_IDS=('google-cloud-shared-dependencies' 'api-common' 'gax')
for ARTIFACT_ID in "${ARTIFACT_IDS[@]}"; do
VERSION=$(grep "^${ARTIFACT_ID}:" versions.txt | cut -d':' -f2 | tr -d '[:space:]')
TAG_NAME="${ARTIFACT_ID}/v$VERSION"
if git show-ref --tags | grep -q "refs/tags/$TAG_NAME"; then
echo "Tag $TAG_NAME already exists. Skipping."
continue
fi
git tag $TAG_NAME
git push origin $TAG_NAME
done
# Generate a tag for unmanaged dependencies check.
# Use fixed tag so that checks in handwritten libraries do not need to
# update the version.
FIXED_CHECK_TAG="unmanaged-dependencies-check-latest"
git tag ${FIXED_CHECK_TAG}
git push origin ${FIXED_CHECK_TAG}