Skip to content

Commit

Permalink
fix: tagging (#1510)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Oct 24, 2023
1 parent 87e57f8 commit b37f6ee
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
cleanup:
name: Pod cleanup
environment: ${{ matrix.environment }}
needs: [deploys-test]
needs: [deploys-prod]
runs-on: ubuntu-22.04
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ jobs:
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
target: ${{ github.sha }}
target: ${{ github.event.number }}
tags: test
21 changes: 10 additions & 11 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
conventional-commits:
name: Conventional commits
name: Conventional Commits
runs-on: ubuntu-22.04
steps:
- uses: amannn/[email protected]
Expand Down Expand Up @@ -57,14 +57,6 @@ jobs:
strategy:
matrix:
package: [migrations, backend, frontend]
include:
- package: migrations
build_context: ./backend/db
triggers: ('backend/db')
- package: backend
triggers: ('backend/')
- package: frontend
triggers: ('frontend/')
timeout-minutes: 10
steps:
- uses: bcgov-nr/[email protected]
Expand All @@ -73,10 +65,17 @@ jobs:
package: ${{ matrix.package }}
tag: ${{ github.sha }}
tag_fallback: test
token: ${{ secrets.GITHUB_TOKEN }}
triggers: ${{ matrix.triggers }}
triggers: ('${{ matrix.triggers }}/')
build_context: ${{ matrix.build_context }}

- name: Tag Docker Images
uses: shrink/actions-docker-registry-tag@v3
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
target: ${{ github.sha }}
tags: ${{ github.event.number }}

# https://github.com/bcgov-nr/action-deployer-openshift
deploys:
name: Deploys
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
password: default
env:
FLYWAY_VALIDATE_MIGRATION_NAMING: true
FLYWAY_LOCATIONS: filesystem:./backend/db/migrations
FLYWAY_LOCATIONS: filesystem:./migrations
FLYWAY_DEFAULT_SCHEMA: "users"

- name: Create Output Folder
Expand Down
12 changes: 0 additions & 12 deletions backend/db/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
image: flyway/flyway:9-alpine
container_name: migrations
command: info migrate info
volumes: ["./backend/db/migrations:/flyway/sql:ro"]
volumes: ["./migrations:/flyway/sql:ro"]
environment:
FLYWAY_URL: jdbc:postgresql://database:5432/postgres
FLYWAY_USER: *POSTGRES_USER
Expand Down
12 changes: 12 additions & 0 deletions migrations/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM flyway/flyway:9.22-alpine

# Copy migrations
COPY ./sql /flyway/sql

# Non-root user
RUN adduser -D app
USER app

# Health check and startup
HEALTHCHECK CMD info
CMD ["info", "migrate", "info"]
File renamed without changes.
File renamed without changes.

0 comments on commit b37f6ee

Please sign in to comment.