-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into #24-news
# Conflicts: # routes/web.php
- Loading branch information
Showing
243 changed files
with
12,943 additions
and
2,814 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.git/ | ||
.idea/ | ||
vendor/ | ||
node_modules/ | ||
.env | ||
.env.beta | ||
./environment/prod/deployment/beta/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,3 @@ DB_PORT=5432 | |
DB_DATABASE=keating | ||
DB_USERNAME=keating | ||
DB_PASSWORD=password | ||
DB_ROOT_PASSWORD=example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,42 +4,18 @@ APP_KEY=base64:sCsJw8z+d/4ymp0OvzSip2h4Vp2hZZhpV2uOxgTqP94= | |
APP_DEBUG=true | ||
APP_URL=http://keating.blumilk.localhost | ||
|
||
LOG_CHANNEL=stack | ||
LOG_DEPRECATIONS_CHANNEL=null | ||
LOG_LEVEL=debug | ||
|
||
DB_CONNECTION=pgsql | ||
DB_HOST=keating-db-dev | ||
DB_PORT=5432 | ||
DB_ROOT_PASSWORD=example | ||
DB_DATABASE=keating | ||
DB_USERNAME=keating | ||
DB_PASSWORD=password | ||
DB_ROOT_PASSWORD=example | ||
|
||
BROADCAST_DRIVER=log | ||
CACHE_DRIVER=redis | ||
FILESYSTEM_DISK=local | ||
QUEUE_CONNECTION=redis | ||
SESSION_DRIVER=redis | ||
SESSION_LIFETIME=120 | ||
|
||
REDIS_HOST=keating-redis-dev | ||
REDIS_PASSWORD=null | ||
REDIS_PORT=6379 | ||
|
||
MAIL_MAILER=smtp | ||
MAIL_HOST=mailpit | ||
MAIL_PORT=1025 | ||
MAIL_USERNAME=null | ||
MAIL_PASSWORD=null | ||
MAIL_ENCRYPTION=null | ||
MAIL_FROM_ADDRESS="[email protected]" | ||
MAIL_FROM_NAME="${APP_NAME}" | ||
|
||
# DOCKER | ||
DOCKER_APP_HOST_PORT=53851 | ||
DOCKER_INSTALL_XDEBUG=true | ||
DOCKER_DATABASE_HOST_PORT=53853 | ||
DOCKER_REDIS_HOST_PORT=53852 | ||
|
||
DOCKER_INSTALL_XDEBUG=true | ||
DOCKER_HOST_USER_ID=1000 |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @blumilksoftware/blumilk | ||
* @blumilksoftware/keating |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Deploy to beta by push | ||
|
||
concurrency: | ||
group: deploy-beta | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
deploy: | ||
environment: beta | ||
name: Deploy to beta | ||
runs-on: ubuntu-22.04 | ||
env: | ||
REPO_NAME: keating | ||
steps: | ||
- name: set branch name | ||
run: echo "BRANCH_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV | ||
|
||
- name: checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ env.BRANCH_NAME }} | ||
|
||
- name: sync with main branch | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<>" | ||
git merge --no-commit --no-ff origin/main | ||
- name: set deployment project version | ||
run: echo "DEPLOYMENT_PROJECT_VERSION=$(bash ./environment/prod/deployment/scripts/version.sh --long)" >> $GITHUB_ENV | ||
|
||
- name: set up Docker Buildx | ||
uses: docker/[email protected] | ||
|
||
- name: login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ github.token }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }} | ||
tags: type=raw,value=beta | ||
context: git | ||
|
||
- name: build and push image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./environment/prod/app/Dockerfile | ||
build-args: DEPLOYMENT_PROJECT_VERSION_ARG=${{ env.DEPLOYMENT_PROJECT_VERSION }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: true | ||
tags: ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}:beta | ||
cache-from: type=gha, ref=ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}-beta-build-cache | ||
cache-to: type=gha, ref=ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}-beta-build-cache, mode=max | ||
|
||
- name: copy files via ssh | ||
uses: appleboy/[email protected] | ||
with: | ||
timeout: 10s | ||
command_timeout: 10m | ||
host: ${{ secrets.VPS_OVH_BF7EC892_HOST }} | ||
port: ${{ secrets.VPS_OVH_BF7EC892_PORT }} | ||
username: ${{ secrets.VPS_OVH_BF7EC892_USERNAME }} | ||
key: ${{ secrets.VPS_OVH_BF7EC892_SSH_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.VPS_OVH_BF7EC892_SSH_PRIVATE_KEY_PASSPHRASE }} | ||
source: "./environment/prod/deployment/beta/*,./environment/prod/deployment/scripts/*" | ||
target: ${{ secrets.KEATING_VPS_BETA_APP_PATH }} | ||
rm: true | ||
|
||
- name: run deployment script over ssh | ||
uses: appleboy/[email protected] | ||
with: | ||
timeout: 10s | ||
command_timeout: 10m | ||
host: ${{ secrets.VPS_OVH_BF7EC892_HOST }} | ||
port: ${{ secrets.VPS_OVH_BF7EC892_PORT }} | ||
username: ${{ secrets.VPS_OVH_BF7EC892_USERNAME }} | ||
key: ${{ secrets.VPS_OVH_BF7EC892_SSH_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.VPS_OVH_BF7EC892_SSH_PRIVATE_KEY_PASSPHRASE }} | ||
script_stop: true | ||
script: | | ||
cd ${{ secrets.KEATING_VPS_BETA_APP_PATH }}/environment/prod/deployment/beta | ||
make beta-deploy BETA_ENV_KEY=${{ secrets.BETA_ENV_KEY }} | ||
docker images --filter dangling=true | grep "ghcr.io/blumilksoftware/${{ env.REPO_NAME }}" | awk '{print $3}'| xargs --no-run-if-empty docker rmi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
/.idea | ||
/.vscode | ||
.composer | ||
/node_modules | ||
/public/build | ||
/public/hot | ||
/public/storage | ||
/public/js/ | ||
/public/css/ | ||
/public/js | ||
/public/css | ||
/public/mix-manifest.json | ||
/vendor | ||
|
||
.env | ||
.env.backup | ||
.env.beta | ||
.phpunit.result.cache | ||
.php-cs-fixer.cache | ||
.appversion | ||
.vite | ||
docker-compose.override.yml | ||
Homestead.json | ||
Homestead.yaml | ||
npm-debug.log | ||
yarn-error.log | ||
google-credentials.json | ||
.idea/ | ||
.vscode/ | ||
.composer | ||
/public/build/ | ||
.appversion | ||
supervisord.pid | ||
.vite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Actions; | ||
|
||
use App\Models\Semester; | ||
use Exception; | ||
use Illuminate\Database\ConnectionInterface; | ||
|
||
class ActivateSemesterAction | ||
{ | ||
public function __construct( | ||
protected ConnectionInterface $db, | ||
) {} | ||
|
||
/** | ||
* @throws Exception | ||
*/ | ||
public function execute(Semester $semester): void | ||
{ | ||
try { | ||
$this->db->beginTransaction(); | ||
|
||
Semester::getActive()?->update(["active" => 0]); | ||
$semester->update(["active" => 1]); | ||
|
||
$this->db->commit(); | ||
} catch (Exception $exception) { | ||
$this->db->rollBack(); | ||
|
||
throw $exception; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.