Skip to content

Bump

Bump #6978

Workflow file for this run

name: Watch
on:
workflow_dispatch:
schedule:
- cron: '30 */4 * * *'
push:
branches:
- master
jobs:
docker:
name: Push tagged docker image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: master
- name: Update Dockerfile with latest version
id: fetch_version

Check failure on line 26 in .github/workflows/watch.yml

View workflow run for this annotation

GitHub Actions / Watch

Invalid workflow file

The workflow is not valid. .github/workflows/watch.yml (Line: 26, Col: 13): The identifier 'fetch_version last=$(curl -s 'https://packagist.org/packages/vimeo/psalm.json?v=latest'|jq '[.package.versions[]|select(.version|test("^\\d+\\.\\d+\\.\\d+$"))|.version]|max_by(.|[splits("[.]")]|map(tonumber))')' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.
last=$(curl -s 'https://packagist.org/packages/vimeo/psalm.json?v=latest'|jq '[.package.versions[]|select(.version|test("^\\d+\\.\\d+\\.\\d+$"))|.version]|max_by(.|[splits("[.]")]|map(tonumber))')
run: |
last=$(echo $last | tr -d '"')
echo "Last Psalm version is $last"
echo "last=$last" >> $GITHUB_OUTPUT
sed -i -re "s/require vimeo\/psalm/require vimeo\/psalm:$last/" Dockerfile
cat Dockerfile
- name: Docker login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build images
run: docker build -t ghcr.io/psalm/psalm-github-actions:${{ steps.fetch_version.outputs.last }} -t ghcr.io/psalm/psalm-github-actions:latest .
- name: Publish
run: |
docker push ghcr.io/psalm/psalm-github-actions:${{ steps.fetch_version.outputs.last }}
docker push ghcr.io/psalm/psalm-github-actions:latest
workflow-keepalive:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: liskin/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}