File tree Expand file tree Collapse file tree 4 files changed +64
-0
lines changed
actions/database-migration-image Expand file tree Collapse file tree 4 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ ARG IMAGE
2+ FROM ${IMAGE}
3+
4+ RUN echo "hello"
5+
6+ ENV RDS_MODE="true"
7+ ENV BUILDUSER=DBAdmin
8+ ENV BUILDUSER_PASS=${SYS_PASSWORD}
Original file line number Diff line number Diff line change 1+ name : ' Database Migration Container'
2+ inputs :
3+ base-image :
4+ type : string
5+ description : Image name without tag
6+ required : true
7+ tag :
8+ type : string
9+ description : Image Tag
10+ required : true
11+ outputs :
12+ image :
13+ description : Created Output Image
14+ value : ${{steps.create.outputs.image}}
15+ runs :
16+ using : " composite"
17+ steps :
18+ - name : Pull Image
19+ shell : bash
20+ run : |
21+ docker pull ${{inputs.base-image}}:${{inputs.tag}}
22+ - name : Create
23+ id : create
24+ shell : bash
25+ run : |
26+ IMAGE_NAME=migration-container:${{inputs.tag}}
27+ docker build -f ${{ github.action_path }}/Dockerfile --build-arg IMAGE=${{inputs.base-image}}:${{inputs.tag}} -t $IMAGE_NAME .
28+ echo "image=$IMAGE_NAME" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change 3838 uses : aws-actions/amazon-ecr-login@v2
3939 with :
4040 mask-password : ' true'
41+ - name : Setup DatabaseMigration Image
42+ id : migration
43+ uses : ./github/actions/database-migration-image
44+ with :
45+ base-image : pull ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/schema_installer
46+ tag : latest-dev
4147 - name : Push API Image to ECR Repo
4248 env :
4349 ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
Original file line number Diff line number Diff line change 1+ ---
2+ name : Test Migration Creation - runs locally
3+ on :
4+ push :
5+
6+
7+ jobs :
8+ create-migration-container :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout code
12+ uses : actions/checkout@v4.2.2
13+ - name : Build Container
14+ id : migration
15+ uses : ./.github/actions/database-migration-image
16+ with :
17+ base-image : ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/schema_installer
18+ tag : latest-dev
19+ - name : Tag Image
20+ run : |
21+ docker tag ${{steps.migration.outputs.image}} otherrepo:test
22+ docker image ls
You can’t perform that action at this time.
0 commit comments