mirror of
https://github.com/ekaaty/ca-certificates-brazil.git
synced 2025-12-06 01:22:38 -03:00
Added auto-tagging workflow
This commit is contained in:
40
.github/workflows/auto-tag.yml
vendored
Normal file
40
.github/workflows/auto-tag.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: auto-tag
|
||||
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '30 3 * * *'
|
||||
|
||||
jobs:
|
||||
create-tag:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install cmake g++ gcc
|
||||
|
||||
- name: Set environment
|
||||
run: |
|
||||
cmake --fresh -B build -S .
|
||||
echo "NEW_TAG=v$(cat build/version)" >> $GITHUB_ENV
|
||||
|
||||
- name: Check if package version has corresponding git tag
|
||||
id: tagged
|
||||
shell: bash
|
||||
run: |
|
||||
git show-ref \
|
||||
--tags --verify --quiet -- \
|
||||
"refs/tags/${NEW_TAG}" \
|
||||
&& echo tagged=1 >> $GITHUB_OUTPUT \
|
||||
|| echo tagged=0 >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create new tag
|
||||
if: steps.tagged.outputs.tagged == 0
|
||||
run: |
|
||||
git tag ${NEW_TAG} \
|
||||
&& git push origin ${NEW_TAG}) \
|
||||
|| exit 0
|
||||
Reference in New Issue
Block a user