-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/ci #27
Merged
Merged
Feature/ci #27
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
8d6be92
Push image on release
leihuayi b709f80
Edit success condition in workflow
leihuayi 518fd78
Edit indentation in workflow
leihuayi 64d750b
Edit login method
leihuayi a486e9f
gitignore
leihuayi 32d6334
Create instance on ovh from terraform
leihuayi 1b0b9ee
Release on tag push
leihuayi a2b8d85
Fix indentation in yml, build and push in one block
leihuayi 971cbf7
Edit way get tag name and add github token secret for release
leihuayi 59b46e6
Edit way get tag name
leihuayi e7fc48c
Remove enhancement from drafter yml
leihuayi 23f186c
Add possible names for bug branches
leihuayi 46e7c1c
Add possible names for feature branches
leihuayi 8b113de
Remove infra, for other branch
leihuayi 5edc5c2
revert to v0.3
leihuayi 701ff0f
Merge develop
leihuayi 575ff62
Merge develop
leihuayi 008f8dd
Build and push only for tag push
leihuayi d01a30e
Add tagging in makefile
leihuayi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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: Push Docker image to GitHub container | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
jobs: | ||
release_github: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
- name: Publish release | ||
uses: release-drafter/release-drafter@v5 | ||
with: | ||
name: ${{ steps.get_version.outputs.VERSION }} | ||
tag: ${{ steps.get_version.outputs.VERSION }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build_and_push: | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- name: Build the Docker image | ||
run: TAG=action docker-compose -f docker-compose-prod.yml build | ||
- name: Login to GHCR | ||
if: success() | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
- name: Push on GHCR | ||
run: | | ||
docker tag basegun-front:action-prod ghcr.io/datalab-mi/basegun/basegun-frontend:${{ steps.get_version.outputs.VERSION }} | ||
docker tag basegun-back:action-prod ghcr.io/datalab-mi/basegun/basegun-backend:${{ steps.get_version.outputs.VERSION }} | ||
docker push ghcr.io/datalab-mi/basegun/basegun-frontend:${{ steps.get_version.outputs.VERSION }} | ||
docker push ghcr.io/datalab-mi/basegun/basegun-backend:${{ steps.get_version.outputs.VERSION }} | ||
docker tag ghcr.io/datalab-mi/basegun/basegun-frontend:${{ steps.get_version.outputs.VERSION }} ghcr.io/datalab-mi/basegun/basegun-frontend:latest | ||
docker tag ghcr.io/datalab-mi/basegun/basegun-backend:${{ steps.get_version.outputs.VERSION }} ghcr.io/datalab-mi/basegun/basegun-backend:latest | ||
docker push ghcr.io/datalab-mi/basegun/basegun-frontend:latest | ||
docker push ghcr.io/datalab-mi/basegun/basegun-backend: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 |
---|---|---|
|
@@ -5,4 +5,5 @@ env/ | |
.env | ||
__pycache__ | ||
*.weights | ||
temp/ | ||
temp/ | ||
openrc.sh |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add multiple command in a bash script like :
bash ci/docker-tag.sh