Skip to content

Get latest azure devops agent version #143316

Get latest azure devops agent version

Get latest azure devops agent version #143316

name: Get latest azure devops agent version
on:
schedule:
- cron: '*/5 * * * *'
jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch release version
run: |
curl -sL https://api.github.com/repos/microsoft/azure-pipelines-agent/releases/latest | \
jq -r ".tag_name" | sed 's/^v\(.*\)$/\1/' > latest-agent-version
- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$([ -z "`git status --porcelain latest-agent-version`" ] && echo "false" || echo "true")
- name: Commit latest release version
if: steps.git-check.outputs.modified == 'true'
run: |
./update-latest-agent-version.sh
git config --global user.name 'CodeZ.one Bot'
git config --global user.email ' 65336809+codez-one-bot@users.noreply.github.com'
git commit -am "Update azure devops agent version"
git push