From 628e55f076b6cfe51d36f16c91cb27885022a340 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 28 Feb 2022 15:26:03 +0100 Subject: [PATCH] create our own psalm container Signed-off-by: szaimen --- .github/workflows/create-psalm-container.yml | 48 ++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/create-psalm-container.yml diff --git a/.github/workflows/create-psalm-container.yml b/.github/workflows/create-psalm-container.yml new file mode 100644 index 00000000..b5926aa4 --- /dev/null +++ b/.github/workflows/create-psalm-container.yml @@ -0,0 +1,48 @@ +name: Create Psalm Container + +on: + workflow_dispatch: + +jobs: + push_to_registry: + runs-on: ubuntu-latest + + name: Create Psalm Container + + permissions: + packages: write + contents: read + + steps: + - name: Check out the repo + run: | + git clone https://github.com/psalm/psalm-github-actions.git + + - name: Modify the Dockerfile + run: | + set -x + sed -i 's|FROM php:7.4-alpine|FROM php:8.0-alpine|' "psalm-github-actions/Dockerfile" + set +x + + - name: Log in to GitHub Docker Registry + uses: docker/login-action@v1 + with: + registry: docker.pkg.github.com + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build container image + uses: docker/build-push-action@v2 + with: + push: true + context: 'psalm-github-actions' + file: 'psalm-github-actions/Dockerfile' + tags: | + ghcr.io/nextcloud/all-in-one-psalm:latest