FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GitHub Viewer

name: CI on: push: branches: - php tags: - 2.*.* pull_request: branches: - php jobs: build: name: Build runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: prepare uses: docker://ecoding/php:8.0 with: args: composer install - name: Lint uses: docker://ecoding/php:8.0 with: args: ./vendor/bin/phpcs --extensions=php --standard=PSR12 app/ tests/ - name: PHPMD uses: docker://ecoding/php:8.0 with: args: ./vendor/bin/phpmd . text phpmd.xml --exclude vendor - name: test uses: docker://ecoding/php:8.0 env: XDEBUG_MODE: coverage with: args: ./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter app/ tests/ - name: codecov uses: codecov/codecov-action@v2 - name: GitHub Environment Variables Action uses: FranzDiebold/github-env-vars-action@v2 - name: Set env run: | echo "APP_VERSION=$CI_SHA_SHORT" >> $GITHUB_ENV - name: Set env when tag if: startsWith(github.ref, 'refs/tags/') run: | echo "APP_VERSION=$CI_ACTION_REF_NAME" >> $GITHUB_ENV - name: build uses: docker://ecoding/php:8.0 env: APP_VERSION: ${{ env.APP_VERSION }} with: args: php coding app:build --build-version=${{ env.APP_VERSION }} - name: Upload Artifact uses: actions/upload-artifact@v2 with: name: coding path: builds/coding - name: Set up Docker Buildx if: startsWith(github.ref, 'refs/tags/') uses: docker/setup-buildx-action@v1 - name: Login to DockerHub if: startsWith(github.ref, 'refs/tags/') uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Build and push id: docker_build if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v2 env: APP_VERSION: ${{ env.APP_VERSION }} with: push: true context: . tags: ecoding/coding-cli:latest,ecoding/coding-cli:${{ env.APP_VERSION }} - name: Image digest if: steps.docker_build.conclusion == 'success' run: echo ${{ steps.docker_build.outputs.digest }}

Back | FazBrowse Home | New Git URL