Skip to content

Commit

Permalink
refactor push_images action
Browse files Browse the repository at this point in the history
  • Loading branch information
AJarombek committed Nov 21, 2023
1 parent 884c807 commit b06a78e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/push_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,20 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Build Docker Image
- name: Set Dockerfile
id: set-dockerfile
run: |
dockerfile="api.flask.dockerfile"
echo "dockerfile=api.flask.dockerfile" >> $GITHUB_ENV
case ${{ github.event.inputs.image }} in
saints-xctf-api-nginx)
dockerfile="api.nginx.dockerfile"
echo "dockerfile=api.nginx.dockerfile" >> $GITHUB_ENV
;;
esac
docker build -t ${{ github.event.inputs.image }}:${{ github.run_number }} -f ${{ dockerfile }} .
- name: Build Docker Image
working-directory: api/src
run: |
docker build -t ${{ github.event.inputs.image }}:${{ github.run_number }} -f ${{ env.dockerfile }} .
docker tag ${{ github.event.inputs.image }}:${{ github.run_number }} ${{ steps.login-ecr.outputs.registry }}/${{ github.event.inputs.image }}:${{ github.run_number }}
docker tag${{ github.event.inputs.image }}:${{ github.run_number }} ${{ steps.login-ecr.outputs.registry }}/${{ github.event.inputs.image }}:${{ github.event.inputs.version }}
Expand Down
1 change: 0 additions & 1 deletion api/src/route/commentRoute.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ def comment_with_id_put(comment_id):
new_comment = Comment(comment_data)

if old_comment != new_comment:

new_comment.modified_date = datetime.now()
new_comment.modified_app = "saints-xctf-api"

Expand Down
1 change: 0 additions & 1 deletion api/src/route/groupRoute.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ def group_by_group_name_put(team_name: str, group_name: str) -> Response:
new_group = Group(group_data)

if old_group != new_group:

new_group.modified_date = datetime.now()
new_group.modified_app = "saints-xctf-api"

Expand Down

0 comments on commit b06a78e

Please sign in to comment.