Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vimeo/psalm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6.9.0
Choose a base ref
...
head repository: vimeo/psalm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6.9.1
Choose a head ref
  • 8 commits
  • 4 files changed
  • 1 contributor

Commits on Mar 16, 2025

  1. Run build on push

    danog committed Mar 16, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    renaudhartert-db Renaud Hartert
    Copy the full SHA
    026b6a2 View commit details
  2. Improve

    danog committed Mar 16, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    renaudhartert-db Renaud Hartert
    Copy the full SHA
    9fcbb6a View commit details
  3. Tweak concurrency

    danog committed Mar 16, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    renaudhartert-db Renaud Hartert
    Copy the full SHA
    3795136 View commit details
  4. Fix issue with tags

    danog committed Mar 16, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    4d9fe7d View commit details
  5. Fix issue with tags

    danog committed Mar 16, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    17267f4 View commit details
  6. Force build

    danog committed Mar 16, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4e3bcad View commit details

Commits on Mar 17, 2025

  1. Fix

    danog committed Mar 17, 2025
    Copy the full SHA
    9b15083 View commit details
  2. Fix

    danog committed Mar 17, 2025
    Copy the full SHA
    81c8a77 View commit details
Showing with 18 additions and 12 deletions.
  1. +12 −6 .github/workflows/build-docker.yml
  2. +2 −2 bin/ci/build-docker.php
  3. +3 −3 bin/ci/push-docker.php
  4. +1 −1 docs/running_psalm/installation.md
18 changes: 12 additions & 6 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
name: Build docker image

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
release:
types:
- published
push:
branches:
- master
- 6.x
tags:
- '*'

permissions:
contents: read
@@ -19,11 +26,10 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
concurrent_skipping: always
cancel_others: true
do_not_skip: '["release"]'
# list files that may affect or are included into the built phar
paths: '["bin/**", "assets/**", "build/**", "dictionaries/**", "src/**", "stubs/**", "psalm", "psalm-language-server", "psalm-plugin", "psalm-refactor", "psalm-review", "psalter", "box.json.dist", "composer.json", "config.xsd", "keys.asc.gpg", "scoper.inc.php"]'
paths: '[".github/**", "bin/**", "assets/**", "build/**", "dictionaries/**", "src/**", "stubs/**", "psalm", "psalm-language-server", "psalm-plugin", "psalm-refactor", "psalm-review", "psalter", "box.json.dist", "composer.json", "config.xsd", "keys.asc.gpg", "scoper.inc.php"]'

build-docker:
permissions:
@@ -119,4 +125,4 @@ jobs:
ACTOR: ${{ github.repository_owner }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
php bin/ci/push-docker.php
php bin/ci/push-docker.php
4 changes: 2 additions & 2 deletions bin/ci/build-docker.php
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@

$commit = getenv('GITHUB_SHA');
$user = getenv('ACTOR');
$ref = substr(getenv('REF'), strlen('refs/heads/'));
$is_tag = getenv('EVENT_NAME') === 'release';
$is_tag = str_starts_with(getenv('REF'), 'refs/tags/');
$ref = str_replace(['refs/heads/', 'refs/tags/'], '', getenv('REF'));

echo "Waiting for commit $commit on $ref...".PHP_EOL;

6 changes: 3 additions & 3 deletions bin/ci/push-docker.php
Original file line number Diff line number Diff line change
@@ -13,18 +13,18 @@ function r(string $cmd): void
}

$user = getenv('ACTOR');
$ref = substr(getenv('REF'), strlen('refs/heads/'));
$is_tag = getenv('EVENT_NAME') === 'release';
$is_tag = str_starts_with(getenv('REF'), 'refs/tags/');
$ref = str_replace(['refs/heads/', 'refs/tags/'], '', getenv('REF'));

$ref = escapeshellarg($ref);

r("docker pull ghcr.io/$user/psalm:$ref-arm64 --platform arm64");
r("docker pull ghcr.io/$user/psalm:$ref-amd64 --platform amd64");

r("docker buildx imagetools create -t ghcr.io/$user/psalm:$ref ghcr.io/$user/psalm:$ref-arm64 ghcr.io/$user/psalm:$ref-amd64");
r("docker pull ghcr.io/$user/psalm:$ref");

if ($is_tag) {
r("docker pull ghcr.io/$user/psalm:$ref");
r("docker tag ghcr.io/$user/psalm:$ref ghcr.io/$user/psalm:latest");
r("docker push ghcr.io/$user/psalm:latest");
}
2 changes: 1 addition & 1 deletion docs/running_psalm/installation.md
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ It is recommended to run Psalm in the official docker image: it uses a custom bu
docker run -v $PWD:/app --rm -it ghcr.io/danog/psalm:latest /composer/vendor/bin/psalm --no-cache
```

More specific tags are also available (i.e. `ghcr.io/danog/psalm:6.9.0`).
More specific tags are also available (i.e. `ghcr.io/danog/psalm:6.9.1`, as well as branch tags).

Issues due to missing extensions can be fixed by enabling them in psalm.xml and/or requiring them in composer.json [see here »](https://psalm.dev/docs/running_psalm/configuration/#enableextensions) for more info.