-
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.
- Loading branch information
1 parent
635df93
commit f7a4b7a
Showing
3 changed files
with
76 additions
and
2 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,38 @@ | ||
name: Build & Publish Backend | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create image name | ||
id: image_name | ||
run: echo "IMAGE_NAME=ghcr.io/$(echo "${{ github.repository }}-backend" | tr '[:upper:]' '[:lower:]')" > "$GITHUB_ENV" | ||
|
||
# create a unique tag for each build for debugging | ||
- name: Set Docker tag | ||
id: date | ||
run: echo "DATE_STAMP=$(date +%s)" > "$GITHUB_ENV" | ||
|
||
- name: Build and push Docker images | ||
uses: iloveitaly/github-action-nixpacks@main | ||
with: | ||
context: './src/backend' | ||
push: true | ||
tags: | | ||
${{ env.IMAGE_NAME }}:sha-${{ env.DATE_STAMP }} | ||
${{ env.IMAGE_NAME }}:latest |
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,38 @@ | ||
name: Build & Publish Frontend | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create image name | ||
id: image_name | ||
run: echo "IMAGE_NAME=ghcr.io/$(echo "${{ github.repository }}-frontend" | tr '[:upper:]' '[:lower:]')" > "$GITHUB_ENV" | ||
|
||
# create a unique tag for each build for debugging | ||
- name: Set Docker tag | ||
id: date | ||
run: echo "DATE_STAMP=$(date +%s)" > "$GITHUB_ENV" | ||
|
||
- name: Build and push Docker images | ||
uses: iloveitaly/github-action-nixpacks@main | ||
with: | ||
context: './src/frontend' | ||
push: true | ||
tags: | | ||
${{ env.IMAGE_NAME }}:sha-${{ env.DATE_STAMP }} | ||
${{ env.IMAGE_NAME }}:latest |
This file was deleted.
Oops, something went wrong.