Skip to content

Bump guibranco/github-infisical-secrets-check-action (#334) #322

Bump guibranco/github-infisical-secrets-check-action (#334)

Bump guibranco/github-infisical-secrets-check-action (#334) #322

Workflow file for this run

name: Deploy via ftp
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
name: Deploy to FTP
runs-on: ubuntu-latest
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v4
with:
versionSpec: "6.x"
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v4
- name: Setup PHP runtime
uses: shivammathur/setup-php@v2
with:
coverage: "none"
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Install dependencies
uses: "php-actions/composer@v6"
with:
dev: yes
progress: yes
- name: Set up environment
run: |
php -r "file_exists('.env') || copy('.env.example', '.env');"
php artisan key:generate
- name: PHPUnit Tests
uses: php-actions/phpunit@v4
with:
version: 11
php_version: 8.3
php_extensions: xdebug
coverage_cobertura: coverage.xml
configuration: phpunit.xml
test_suffix: Test.php
args: --coverage-filter tests
env:
XDEBUG_MODE: coverage
- name: Create SQLite database file
run: |
touch database/database.sqlite
- name: Zip files
run: |
zip -r deploy.zip . -x install.php
mkdir deploy
mv deploy.zip deploy
cp "install.php" deploy
# - name: Upload service
# uses: sebastianpopp/ftp-action@releases/v2
# with:
# host: ${{ secrets.FTP_SERVER }}
# user: ${{ secrets.FTP_USERNAME }}
# password: ${{ secrets.FTP_PASSWORD }}
# localDir: "deploy/"
# remoteDir: "/"
# - name: Call installation endpoint
# run: curl --fail-with-body "${{ secrets.INSTALLATION_ENDPOINT }}install.php"
create_release:
name: Create release
needs: deploy
env:
SEMVER: ${{ needs.deploy.outputs.semVer }}
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: ncipollo/[email protected]
with:
allowUpdates: false
skipIfReleaseExists: true
draft: false
makeLatest: true
tag: v${{ env.SEMVER }}
name: Release v${{ env.SEMVER }}
generateReleaseNotes: true
body: Release ${{ env.SEMVER }} of ${{ github.event.repository.name }}