From 47ad914ed649861e1d1818130fcbbafcd48f797f Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Sat, 4 Mar 2023 18:58:46 -0400 Subject: [PATCH] Move images to ghcr.io --- .github/workflows/watch.yml | 17 ++++++++++++----- README.md | 18 +++++++++--------- action.yml | 3 +-- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/watch.yml b/.github/workflows/watch.yml index 2bdd8e3..5237ce6 100644 --- a/.github/workflows/watch.yml +++ b/.github/workflows/watch.yml @@ -9,6 +9,9 @@ jobs: docker: name: Push tagged docker image runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Checkout code @@ -26,14 +29,18 @@ jobs: sed -i -re "s/require vimeo\/psalm/require vimeo\/psalm:$last/" Dockerfile cat Dockerfile + - name: Docker login - uses: docker/login-action@v2 + uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build images - run: docker build -t vimeo/psalm-github-actions:${{ steps.fetch_version.outputs.last }} . + 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 vimeo/psalm-github-actions:${{ steps.fetch_version.outputs.last }} + run: | + docker push ghcr.io/psalm/psalm-github-actions:${{ steps.fetch_version.outputs.last }} + docker push ghcr.io/psalm/psalm-github-actions:latest diff --git a/README.md b/README.md index 45fea8f..f26165a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v2 - name: Psalm - uses: docker://vimeo/psalm-github-actions + uses: docker://ghcr.io/psalm/psalm-github-actions ``` @@ -26,8 +26,8 @@ You can also specify a version (after 3.14.2). ```diff - name: Psalm -- uses: docker://vimeo/psalm-github-actions -+ uses: docker://vimeo/psalm-github-actions:3.14.2 +- uses: docker://ghcr.io/psalm/psalm-github-actions ++ uses: docker://ghcr.io/psalm/psalm-github-actions:5.7.7 ``` ## Use Security Analysis @@ -36,7 +36,7 @@ Psalm supports [Security Analysis](https://psalm.dev/docs/security_analysis/). Y ```diff - name: Psalm - uses: docker://vimeo/psalm-github-actions + uses: docker://ghcr.io/psalm/psalm-github-actions + with: + security_analysis: true ``` @@ -49,7 +49,7 @@ Use the following config: ```diff - name: Psalm - uses: docker://vimeo/psalm-github-actions + uses: docker://ghcr.io/psalm/psalm-github-actions + with: + security_analysis: true + report_file: results.sarif @@ -67,7 +67,7 @@ These are both set to false by default. ```diff - name: Psalm - uses: docker://vimeo/psalm-github-actions + uses: docker://ghcr.io/psalm/psalm-github-actions + with: + composer_require_dev: true + composer_ignore_platform_reqs: true @@ -81,7 +81,7 @@ Use the following config: ```diff - name: Psalm - uses: docker://vimeo/psalm-github-actions + uses: docker://ghcr.io/psalm/psalm-github-actions + with: + relative_dir: ./subdir ``` @@ -102,7 +102,7 @@ jobs: ... - name: Psalm - uses: docker://vimeo/psalm-github-actions + uses: docker://ghcr.io/psalm/psalm-github-actions with: ssh_key: ${{ secrets.SOME_PRIVATE_KEY }} ssh_key_pub: ${{ secrets.SOME_PUBLIC_KEY }} @@ -110,4 +110,4 @@ jobs: ssh_domain: my-own-github.com ``` -github.com, gitlab.com and bitbucket.org are automatically added to the list of SSH known hosts. You can provide your own domain via `ssh_domain` input. \ No newline at end of file +github.com, gitlab.com and bitbucket.org are automatically added to the list of SSH known hosts. You can provide your own domain via `ssh_domain` input. diff --git a/action.yml b/action.yml index dbd9ca4..26dc29f 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,3 @@ - # https://help.github.com/en/articles/metadata-syntax-for-github-actions author: 'muglug' @@ -45,4 +44,4 @@ inputs: runs: using: 'docker' - image: 'docker://vimeo/psalm-github-actions' + image: 'docker://ghcr.io/psalm/psalm-github-actions'