-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from alexo-bunnyshell/feature/blue-navbar
add new workflow (and make header blue)
- Loading branch information
Showing
6 changed files
with
57 additions
and
11 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,25 @@ | ||
name: Deploy Bunnyshell Env | ||
|
||
concurrency: bns-deploy-${{ github.event.workflow_run.referenced_workflows[0].ref || format('refs/pull/{0}/merge', github.event.issue.number) }} | ||
|
||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- "Build and Push Docker image" | ||
types: | ||
- completed | ||
issue_comment: | ||
types: [ created, edited ] | ||
|
||
|
||
jobs: | ||
debug: | ||
name: Bunnyshell | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Debug" | ||
run: | | ||
echo "DEBUG: ${{ github.event.workflow_run.referenced_workflows[0].ref || format('refs/pull/{0}/merge', github.event.issue.number) }}" | ||
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 |
---|---|---|
|
@@ -128,3 +128,5 @@ dist | |
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
build/index.html | ||
build/version.txt |
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,17 +1,21 @@ | ||
from alpine as build | ||
|
||
RUN apk add --no-cache sed | ||
COPY app/ /app | ||
RUN ls -alh /app | ||
RUN echo "test" | ||
RUN VERSION=$(cat /app/version.txt) \ | ||
#&& echo "version: $VERSION xxx" > /app/outversion.txt \ | ||
&& sed -i'' "s/--version--/$VERSION/g" /app/index.html | ||
|
||
RUN mkdir /work | ||
WORKDIR /work | ||
|
||
COPY app/ app/ | ||
RUN ls -alh app | ||
|
||
COPY build.sh build.sh | ||
RUN chmod +x build.sh | ||
RUN ./build.sh | ||
|
||
|
||
from nginx:alpine as prod | ||
|
||
|
||
COPY --from=build /app /usr/share/nginx/html | ||
COPY --from=build /work/build /usr/share/nginx/html | ||
|
||
|
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,17 @@ | ||
#!/bin/sh | ||
# This script is used to build the project | ||
|
||
#remove old build | ||
rm -rf build | ||
|
||
#copy the app to build | ||
cp -a app build | ||
|
||
cd build | ||
#extract the VERSION variable | ||
VERSION=$(cat version.txt) | ||
echo "Version: $VERSION" | ||
sed -i '.bak' "s/--version--/$VERSION/g" index.html | ||
rm index.html.bak | ||
|
||
echo "Build completed" |
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 |
---|---|---|
|
@@ -8,5 +8,3 @@ services: | |
target: prod | ||
ports: | ||
- "8080:80" | ||
expose: | ||
- 8080 |