Skip to content

Merge pull request #45 from kz6fittycent/master #16

Merge pull request #45 from kz6fittycent/master

Merge pull request #45 from kz6fittycent/master #16

name: Update
on:
# Runs at 10:00 UTC every day
schedule:
- cron: '0 10 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
sync:
name: 🔄 Sync version with upstream
environment: "Candidate Branch"
runs-on: ubuntu-latest
steps:
- name: 🔄 Sync version with upstream
uses: snapcrafters/ci/sync-version@main
with:
token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
update-script: |
# Update the snapcraft.yaml to match upstream version
API="https://api.github.com/repos/jenkinsci/jenkins/releases/latest"

Check failure on line 26 in .github/workflows/sync-version-with-upstream.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/sync-version-with-upstream.yml

Invalid workflow file

You have an error in your yaml syntax on line 26
VERSION=$(curl -s "${API}" | grep -i name | awk 'FNR == 3 {print $2}' | cut -d ',' -f1)
sed -i 's/^\(version: \).*$/\1'"$VERSION"'/' snap/snapcraft.yaml