forked from openwallet-foundation/acapy
-
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.
Merge pull request openwallet-foundation#3 from baegjae/feature/swagg…
…er-apm-workflows Updates for platform works
- Loading branch information
Showing
7 changed files
with
116 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
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,77 @@ | ||
name: Python CI with Docker | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
|
||
steps: | ||
- uses: act10ns/slack@v1 | ||
with: | ||
status: starting | ||
if: always() | ||
|
||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
with: | ||
path: main | ||
- name: Checkout ston-config | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: sktston/ston-config | ||
token: ${{ secrets.PAT }} | ||
path: config | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ap-northeast-2 | ||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
- name: Set environment variables | ||
run: | | ||
echo "::set-env name=ECR_REGISTRY::${{ steps.login-ecr.outputs.registry }}" | ||
echo "::set-env name=ECR_REPOSITORY::ston/aca-py" | ||
echo "::set-env name=IMAGE_TAG::${{ github.sha }}" | ||
echo "::set-env name=DOCKERFILE_PATH::docker/Dockerfile.run" | ||
- name: Build, tag, and push image to Amazon ECR | ||
id: build-and-push-to-ecr | ||
working-directory: main | ||
run: | | ||
docker build -f $DOCKERFILE_PATH -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
- name: Setup Kustomize | ||
uses: imranismail/setup-kustomize@v1 | ||
with: | ||
kustomize-version: "3.8.1" | ||
- name: Update the image tag with Kustomize | ||
id: update-config-with-kustomize | ||
working-directory: config | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git pull origin master | ||
cd overlays/dev | ||
kustomize edit set image $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
git add kustomization.yaml | ||
git commit -m "Deploying image $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" | ||
git push origin master | ||
- uses: act10ns/slack@v1 | ||
with: | ||
status: ${{ job.status }} | ||
steps: ${{ toJson(steps) }} | ||
if: always() |
File renamed without changes.
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
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 |
---|---|---|
|
@@ -14,3 +14,4 @@ pyld==2.0.1 | |
py_multicodec==0.2.1 | ||
pyyaml~=5.3.1 | ||
ConfigArgParse~=1.2.3 | ||
elastic-apm~=5.9.0 |