Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the composer group with 4 updates #382

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ env:
DB_DATABASE: esac
DB_USERNAME: mysql
DB_PASSWORD: mysql
HAS_CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN != '' }}

jobs:
laravel-tests:
tests:
name: Build front-end & run tests
runs-on: ubuntu-latest
environment: Build
steps:
Expand All @@ -35,12 +37,6 @@ jobs:
restore-keys: |
${{ runner.os }}-node-

- name: Docker Login
uses: docker/login-action@v3
with:
username: esacci
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down Expand Up @@ -85,22 +81,37 @@ jobs:
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml

- name: Upload to codecov
- name: Upload to Codecov
uses: codecov/codecov-action@v3
if: env.HAS_CODECOV_TOKEN
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
fail_ci_if_error: true

- name: Build and push Docker images
uses: docker/build-push-action@v5
publish:
name: Build and push Docker image
runs-on: ubuntu-latest
environment: Build
needs: tests
if: github.secret_source == 'Actions' || github.secret_source == 'Dependabot'
steps:
- name: Docker Login
uses: docker/login-action@v3
with:
username: esacci
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
push: true
tags: esac/website:${{ github.run_number }}

deploy:
name: Deploy to production
runs-on: ubuntu-latest
needs: laravel-tests
needs: publish
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Deploy via SSH
Expand All @@ -109,4 +120,4 @@ jobs:
host: ${{ secrets.SSH_HOST }}
user: ic
private_key: ${{ secrets.SSH_PRIVATE_KEY }}
command: ./update.sh website "${{ github.run_number }}" "${{ github.actor }}" "${{ github.event.head_commit.message }}" "${{ github.event.head_commit.timestamp }}" "${{ github.ref }}"
command: ./update.sh website "${{ github.run_number }}" "${{ github.actor }}" "${{ github.event.head_commit.message }}" "${{ github.event.head_commit.timestamp }}" "${{ github.ref }}"
Loading