Skip to content

Commit

Permalink
Feat/68 aws ecr push (#69)
Browse files Browse the repository at this point in the history
* chore: add ecr-push workflow

* docs: update open-api.json

* chore: fix repository name

* chore: commit for checking image tag

* chore: update aws-ecr-push.yml only push main branch

---------

Co-authored-by: Git Actions <no-reply@github.com>
  • Loading branch information
junha-ahn and Git Actions authored Aug 13, 2023
1 parent 130af7b commit ca69086
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/aws-ecr-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: push to ECR
on:
push:
branches:
- main

env:
AWS_REGION: ap-northeast-2
ECR_REPOSITORY: ticketing-backend-ecr

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ECR_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_ECR_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
docker push $ECR_REGISTRY/$ECR_REPOSITORY --all-tags
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
2 changes: 1 addition & 1 deletion docs/open-api.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"openapi":"3.0.1","info":{"title":"프동프동 티켓팅 시스템 API Document","description":"티켓팅 시스템 백엔드 API입니다.","version":"1.0.0"},"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"paths":{"/reservations/{id}":{"get":{"tags":["reservation-controller"],"operationId":"getReservation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReservationResponse"}}}}}},"put":{"tags":["reservation-controller"],"operationId":"updateReservation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReservationUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReservationResponse"}}}}}},"delete":{"tags":["reservation-controller"],"operationId":"deleteReservation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}}}},"/events/{id}":{"get":{"tags":["event-controller"],"operationId":"getEvent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EventResponse"}}}}}},"put":{"tags":["event-controller"],"operationId":"updateEvent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EventResponse"}}}}}},"delete":{"tags":["event-controller"],"operationId":"deleteEvent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Unit"}}}}}}},"/users/signup":{"post":{"tags":["user-controller"],"operationId":"signup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignUpRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}}}},"/reservations":{"post":{"tags":["reservation-controller"],"operationId":"createReservation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReservationCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReservationResponse"}}}}}}},"/events":{"post":{"tags":["event-controller"],"operationId":"createEvent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EventResponse"}}}}}}},"/bookmarks":{"get":{"tags":["bookmark-controller"],"operationId":"getBookmarks","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}},"post":{"tags":["bookmark-controller"],"operationId":"addBookmark","parameters":[{"name":"boardFormDto","in":"query","required":true,"schema":{"$ref":"#/components/schemas/BookmarkFromdto"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/users/access_token_info":{"get":{"tags":["user-controller"],"operationId":"getAccessTokenInfo","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/events/":{"get":{"tags":["event-controller"],"operationId":"getEvents","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventResponse"}}}}}}}},"/bookmarks/{id}":{"get":{"tags":["bookmark-controller"],"operationId":"getBookmark","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}},"delete":{"tags":["bookmark-controller"],"operationId":"deleteBookmark","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"ReservationUpdateRequest":{"required":["eventId"],"type":"object","properties":{"eventId":{"type":"integer","format":"int64"}}},"ReservationResponse":{"required":["bookedAt","eventId","id","userId"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"eventId":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"},"bookedAt":{"type":"string","format":"date-time"}}},"EventCreateRequest":{"required":["date","maxAttendees","reservationEndTime","reservationStartTime","title"],"type":"object","properties":{"title":{"type":"string"},"date":{"type":"string","format":"date-time"},"reservationStartTime":{"type":"string","format":"date-time"},"reservationEndTime":{"type":"string","format":"date-time"},"maxAttendees":{"type":"integer","format":"int32"}}},"EventResponse":{"required":["date","id","maxAttendees","reservationEndTime","reservationStartTime","title"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"date":{"type":"string","format":"date-time"},"reservationStartTime":{"type":"string","format":"date-time"},"reservationEndTime":{"type":"string","format":"date-time"},"maxAttendees":{"type":"integer","format":"int32"}}},"SignUpRequest":{"required":["email","name","password"],"type":"object","properties":{"email":{"type":"string"},"name":{"maxLength":30,"minLength":2,"type":"string"},"password":{"maxLength":128,"minLength":9,"type":"string"}}},"UserDto":{"required":["email","name"],"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"token":{"type":"string"}}},"ReservationCreateRequest":{"required":["eventId","userId"],"type":"object","properties":{"eventId":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"}}},"BookmarkFromdto":{"required":["show_id","user_id"],"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"show_id":{"type":"integer","format":"int32"}}},"Unit":{"type":"object"}}}}
{"openapi":"3.0.1","info":{"title":"프동프동 티켓팅 시스템 API Document","description":"티켓팅 시스템 백엔드 API입니다.","version":"1.0.0"},"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"paths":{"/reservations/{id}":{"get":{"tags":["reservation-controller"],"operationId":"getReservation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReservationResponse"}}}}}},"put":{"tags":["reservation-controller"],"operationId":"updateReservation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReservationUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReservationResponse"}}}}}},"delete":{"tags":["reservation-controller"],"operationId":"deleteReservation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}}}},"/events/{id}":{"get":{"tags":["event-controller"],"operationId":"getEvent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EventResponse"}}}}}},"put":{"tags":["event-controller"],"operationId":"updateEvent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EventResponse"}}}}}},"delete":{"tags":["event-controller"],"operationId":"deleteEvent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Unit"}}}}}}},"/users/signup":{"post":{"tags":["user-controller"],"operationId":"signup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignUpRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}}}},"/reservations":{"post":{"tags":["reservation-controller"],"operationId":"createReservation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReservationCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReservationResponse"}}}}}}},"/events":{"post":{"tags":["event-controller"],"operationId":"createEvent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EventResponse"}}}}}}},"/bookmarks":{"get":{"tags":["bookmark-controller"],"operationId":"getBookmarks","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}},"post":{"tags":["bookmark-controller"],"operationId":"addBookmark","parameters":[{"name":"boardFormDto","in":"query","required":true,"schema":{"$ref":"#/components/schemas/BookmarkFromdto"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/users/access_token_info":{"get":{"tags":["user-controller"],"operationId":"getAccessTokenInfo","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/events/":{"get":{"tags":["event-controller"],"operationId":"getEvents","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventResponse"}}}}}}}},"/bookmarks/{id}":{"get":{"tags":["bookmark-controller"],"operationId":"getBookmark","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}},"delete":{"tags":["bookmark-controller"],"operationId":"deleteBookmark","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"ReservationUpdateRequest":{"required":["eventId"],"type":"object","properties":{"eventId":{"type":"integer","format":"int64"}}},"ReservationResponse":{"required":["bookedAt","eventId","id","userId"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"eventId":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"},"bookedAt":{"type":"string","format":"date-time"}}},"EventCreateRequest":{"required":["date","maxAttendees","reservationEndTime","reservationStartTime","title"],"type":"object","properties":{"title":{"type":"string"},"date":{"type":"string","format":"date-time"},"reservationStartTime":{"type":"string","format":"date-time"},"reservationEndTime":{"type":"string","format":"date-time"},"maxAttendees":{"type":"integer","format":"int32"}}},"EventResponse":{"required":["date","id","maxAttendees","reservationEndTime","reservationStartTime","title"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"date":{"type":"string","format":"date-time"},"reservationStartTime":{"type":"string","format":"date-time"},"reservationEndTime":{"type":"string","format":"date-time"},"maxAttendees":{"type":"integer","format":"int32"}}},"SignUpRequest":{"required":["email","name","password"],"type":"object","properties":{"email":{"type":"string"},"name":{"maxLength":30,"minLength":2,"type":"string"},"password":{"maxLength":128,"minLength":9,"type":"string"}}},"UserDto":{"required":["email","name"],"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"ReservationCreateRequest":{"required":["eventId","userId"],"type":"object","properties":{"eventId":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"}}},"BookmarkFromdto":{"required":["show_id","user_id"],"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"show_id":{"type":"integer","format":"int32"}}},"Unit":{"type":"object"}}}}

0 comments on commit ca69086

Please sign in to comment.