-
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 branch 'main' into feature/olp-51-add-feedback-button
- Loading branch information
Showing
21 changed files
with
669 additions
and
517 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,64 @@ | ||
name: Deploy to development | ||
|
||
on: | ||
workflow_dispatch | ||
|
||
jobs: | ||
set-version: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set version | ||
run: | | ||
sed -i "s/VITE_VERSION=.*/VITE_VERSION=\"${GITHUB_SHA:0:8}\"/" openlineplanner/.env.development | ||
- uses: EndBug/add-and-commit@v9 | ||
with: | ||
author_name: Github Actions | ||
author_email: hi@xatellite.space | ||
message: 'Set current version in env file' | ||
build: | ||
permissions: | ||
packages: write | ||
needs: set-version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set version | ||
run: | | ||
echo "VERSION=${GITHUB_SHA:0:8}" >> "$GITHUB_ENV" | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push frontend | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: openlineplanner | ||
push: true | ||
tags: ghcr.io/xatellite/openlineplanner/olp-frontend:${{ env.VERSION }} | ||
- name: Build and push backend | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: openlineplanner-backend | ||
push: true | ||
tags: ghcr.io/xatellite/openlineplanner/olp-backend:${{ env.VERSION }} | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set version | ||
run: | | ||
echo "VERSION=${GITHUB_SHA:0:8}" >> "$GITHUB_ENV" | ||
- name: Trigger pipeline | ||
run: | | ||
curl -vvv -X POST \ | ||
--fail \ | ||
-F token=${{ secrets.GITLAB_TOKEN }} \ | ||
-F "ref=main" \ | ||
-F "variables[TEST]=true" \ | ||
-F "variables[VERSION]=${VERSION}" \ | ||
https://gitlab.com/api/v4/projects/46252495/trigger/pipeline |
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,50 @@ | ||
name: Deploy to prod | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
packages: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set version | ||
run: | | ||
echo "VERSION=$(grep -oP 'VITE_VERSION="\K\d+\.\d+\.\d+' openlineplanner/.env.production)" >> "$GITHUB_ENV" | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push frontend | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: openlineplanner | ||
push: true | ||
tags: ghcr.io/xatellite/openlineplanner/olp-frontend:${{ env.VERSION }} | ||
- name: Build and push backend | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: openlineplanner-backend | ||
push: true | ||
tags: ghcr.io/xatellite/openlineplanner/olp-backend:${{ env.VERSION }} | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set version | ||
run: | | ||
echo "VERSION=$(grep -oP 'VITE_VERSION="\K\d+\.\d+\.\d+' openlineplanner/.env.production)" >> "$GITHUB_ENV" | ||
- name: Trigger pipeline | ||
run: | | ||
curl -vvv -X POST \ | ||
--fail \ | ||
-F token=${{ secrets.GITLAB_TOKEN }} \ | ||
-F "ref=main" \ | ||
-F "variables[TEST]=false" \ | ||
-F "variables[VERSION]=${VERSION}" \ | ||
https://gitlab.com/api/v4/projects/46252495/trigger/pipeline |
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 @@ | ||
target |
Oops, something went wrong.