-
-
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.
Added github actions automagic docker containers build workflow (#1)
- Loading branch information
Showing
15 changed files
with
354 additions
and
116 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,35 @@ | ||
name: Update Dockerhub Description | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- README.md | ||
- .github/workflows/dockerhub-description.yml | ||
|
||
jobs: | ||
update-docker-hub-description: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# checkout the repo to $GITHUB_WORKSPACE | ||
- uses: actions/checkout@v3 | ||
|
||
# update the docker hub description and overview | ||
- name: Dockerhub description and overview update | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
repository: hetorusnl/vocya-api | ||
short-description: ${{ github.event.repository.description }} | ||
|
||
# update the docker hub description and overview | ||
- name: Dockerhub description and overview update | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
repository: hetorusnl/vocya-dashboard | ||
short-description: ${{ github.event.repository.description }} |
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,59 @@ | ||
name: Master branch CI/CD | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
build-and-push-container: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# checkout the repo to $GITHUB_WORKSPACE | ||
- uses: actions/checkout@v3 | ||
|
||
# login to docker hub | ||
- name: Login to Dockerhub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
# login to github container registry | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# build and push the vocya api docker image to ghcr.io | ||
- name: Build and Push Image to ghcr.io | ||
run: ./gha/build-container.sh | ||
env: | ||
CI_REGISTRY: ghcr.io/hetorusnl/vocya-api | ||
DOCKERFILE: api.Dockerfile | ||
BRANCH_NAME: ${{ github.ref_name }} | ||
|
||
# build and push the vocya api docker image to docker hub | ||
- name: Build and Push Image to Dockerhub | ||
run: ./gha/build-container.sh | ||
env: | ||
CI_REGISTRY: hetorusnl/vocya-api | ||
DOCKERFILE: api.Dockerfile | ||
BRANCH_NAME: ${{ github.ref_name }} | ||
|
||
# build and push the vocya dashboard docker image to ghcr.io | ||
- name: Build and Push Image to ghcr.io | ||
run: ./gha/build-container.sh | ||
env: | ||
CI_REGISTRY: ghcr.io/hetorusnl/vocya-dashboard | ||
DOCKERFILE: dashboard.Dockerfile | ||
BRANCH_NAME: ${{ github.ref_name }} | ||
|
||
# build and push the vocya dashboard docker image to docker hub | ||
- name: Build and Push Image to Dockerhub | ||
run: ./gha/build-container.sh | ||
env: | ||
CI_REGISTRY: hetorusnl/vocya-dashboard | ||
DOCKERFILE: dashboard.Dockerfile | ||
BRANCH_NAME: ${{ github.ref_name }} |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Tim Klein Nijenhuis <tim@hetorus.nl> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,12 @@ | ||
FROM hetorusnl/python-poetry | ||
|
||
# add the api python files to the docker | ||
COPY api/ /code | ||
|
||
# add/update the container labels | ||
LABEL org.label-schema.vcs-ref=$VCS_REF | ||
LABEL org.label-schema.vcs-url=https://github.com/HetorusNL/vocya | ||
LABEL org.opencontainers.image.authors=tim@hetorus.nl | ||
LABEL org.opencontainers.image.source=https://github.com/HetorusNL/vocya | ||
LABEL org.opencontainers.image.description="Vocya API for learning Japanese words" | ||
LABEL org.opencontainers.image.licenses=MIT |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.