Skip to content

.github/workflows/tst.yml #15

.github/workflows/tst.yml

.github/workflows/tst.yml #15

Workflow file for this run

on:
# schedule:
# - cron: '0 0 * * *'
workflow_dispatch:
inputs:
vim_tag:
description: 'Vim tag (empty=latest)'
default: ''
jobs:
check-updates-job:
runs-on: ubuntu-latest
outputs:
updated: ${{ steps.check-updates.outputs.updated }}
prev_vim_tag: ${{ steps.check-updates.outputs.prev_vim_tag }}
vim_tag: ${{ steps.check-updates.outputs.vim_tag }}
kstr0k_tag: ${{ steps.check-updates.outputs.kstr0k_tag }}
steps:
- name: Get latest tags
id: latest-tags
env:
MYOWNER: ${{ github.repository_owner }}
MYREPO: ${{ github.event.repository.name }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GQL_Q1: |
query($myowner:String!,$myrepo:String!) {
appimage: repository(owner:$myowner, name:$myrepo) {
refs(refPrefix:"refs/tags/", last:2) {
edges { node { name } }
}
}
vim: repository(owner:"vim", name:"vim") {
refs(refPrefix:"refs/tags/", last:1) {
edges { node { name } }
}
}
}
run: |
json=$(gh api graphql -F myowner="$MYOWNER" -F myrepo="$MYREPO" -f query="$GQL_Q1")
printf '%s\n' "json=$json" | tee -a "$GITHUB_OUTPUT"
- name: Check updates
id: check-updates
run: |
printf '%s' 'prev json:'; cat <<'EOF'
${{ toJSON(fromJSON(steps.latest-tags.outputs.json).data.appimage.refs.edges[1].node.name) }}
EOF