-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding GitHub workflows to generate container images (#235)
* Adding GitHub workflows to generate container images for app * Updating Flourish references to SparkHacks in README. --------- Co-authored-by: Chase 李 <[email protected]>
- Loading branch information
Showing
3 changed files
with
99 additions
and
3 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,52 @@ | ||
--- | ||
name: Container Build Merge | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout Repository 🛎️ | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx 🐳 | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Container Registry 🪪 | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for container 📤 | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Use Node 20.x 🔧 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
cache: "npm" | ||
- name: Install App Build Dependencies 📃 | ||
run: | | ||
npm ci | ||
- name: Build App 🛠️ | ||
run: | | ||
npm run build | ||
- name: Build and push container 🚢 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,44 @@ | ||
--- | ||
name: Container Build PR | ||
|
||
on: | ||
pull_request: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout Repository 🛎️ | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Extract metadata (tags, labels) for container 📤 | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Use Node 20.x 🔧 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
cache: "npm" | ||
- name: Install App Build Dependencies 📃 | ||
run: | | ||
npm ci | ||
- name: Build App 🛠️ | ||
run: | | ||
npm run build | ||
- name: Build container 📦 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: false | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 |
---|---|---|
|
@@ -11,8 +11,8 @@ You will need to install the following programs | |
- [Node.js](https://nodejs.org/en/) (Use the LTS release) | ||
|
||
Once you have installed the above, open your terminal and execute the following commands | ||
- `git clone [email protected]:acm-uic/flourish-2023.git` (You may want to clone this to your Downloads or other folder) | ||
- `cd flourish-2023` | ||
- `git clone [email protected]:acm-uic/sparkhacks-2023.git` (You may want to clone this to your Downloads or other folder) | ||
- `cd sparkhacks-2023` | ||
- `npm install` | ||
|
||
Once you have done these steps, you are good to go! | ||
|
@@ -23,7 +23,7 @@ Running the website locally is as simple as `npm start`! | |
|
||
## Making a contribution | ||
|
||
Follow the guide in the [wiki](https://github.com/acm-uic/flourish-2023/wiki/Guide-to-Contribution) | ||
Follow the guide in the [wiki](https://github.com/acm-uic/sparkhacks-2023/wiki/Guide-to-Contribution) | ||
|
||
### Helper scripts | ||
|
||
|