-
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.
Add automatic package generation (Github Actions)
- Loading branch information
1 parent
26632d2
commit 41964b4
Showing
3 changed files
with
52 additions
and
0 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,2 @@ | ||
Dockerfile | ||
README.md |
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,34 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Log in to the Container registry | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Build the Docker image | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag aichan-cv:latest | ||
|
||
# Push the Docker image to GHCR | ||
- name: Push Docker images to GHCR | ||
run: | | ||
# Push the main app image | ||
docker push ghcr.io/${{ github.repository_owner }}/aichan-cv: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,16 @@ | ||
# Dockerfile | ||
FROM nginx:latest | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Remove the directory | ||
RUN rm -rf /usr/share/nginx/html | ||
|
||
# Copy the repository to the directory | ||
COPY . /usr/share/nginx/html | ||
|
||
# Expose port 80 for NGINX | ||
EXPOSE 80 | ||
|
||
# Start NGINX | ||
CMD ["nginx", "-g", "daemon off;"] |