Skip to content

Commit

Permalink
fix: merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
sdh100shaun committed Dec 16, 2024
2 parents d5ec492 + 6dfe2e7 commit 301c642
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/run-liquibase.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Run Liquibase Migrations
permissions:
id-token: write
contents: read
on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -36,11 +39,9 @@ on:
push:
type: boolean
required: true
default: false
account:
type: string
required: true
enum: ["nonprod", "prod"]
ref:
type: string
required: false
Expand All @@ -56,19 +57,30 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.event.inputs.ref }}

- name: Checkout ETL repository
uses: actions/checkout@v4
with:
repository: dvsa/olcs-etl
path: infra/docker/liquibase/changelog
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Configure AWS credentials
if: ${{ inputs.push || github.event_name == 'workflow_dispatch' }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_OIDC_ROLE }}
aws-region: ${{ env.AWS_REGION }}

- name: Login to ECR
if: ${{ inputs.push || github.event_name == 'workflow_dispatch' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}

- name: Build and push
uses: docker/build-push-action@v6
with:
Expand All @@ -79,8 +91,6 @@ jobs:
${{ env.REGISTRY }}/vol-app/liquibase:latest
cache-from: type=gha,scope=liquibase
cache-to: type=gha,mode=max,scope=liquibase
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
submit-batch-job:
needs: build
if: |
Expand Down
7 changes: 1 addition & 6 deletions infra/docker/liquibase/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
FROM alpine/git AS repo
ARG GITHUB_TOKEN
WORKDIR /app
RUN git clone https://${GITHUB_TOKEN}@github.com/dvsa/olcs-etl .

FROM liquibase/liquibase
USER root
COPY --from=repo /app /liquibase/changelog
COPY changelog /liquibase/changelog
COPY entrypoint.sh /liquibase/
RUN chmod +x /liquibase/entrypoint.sh
ENV INSTALL_MYSQL=true
Expand Down

0 comments on commit 301c642

Please sign in to comment.