From 0d2e264de47c9ca72bf483a637d6ad8ed2b52faa Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Tue, 13 Dec 2022 15:37:04 -0500 Subject: [PATCH] ci: add test pg build workflow --- .github/workflows/dev-db-pgtest.yml | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/dev-db-pgtest.yml diff --git a/.github/workflows/dev-db-pgtest.yml b/.github/workflows/dev-db-pgtest.yml new file mode 100644 index 000000000..9ccae8d95 --- /dev/null +++ b/.github/workflows/dev-db-pgtest.yml @@ -0,0 +1,54 @@ +name: Dev PG DB Test + +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build-pg: + name: Build PostgreSQL Docker Images + runs-on: ubuntu-latest + container: ghcr.io/ietf-tools/datatracker-app-base:latest + permissions: + contents: read + packages: write + services: + db: + image: ghcr.io/ietf-tools/datatracker-db:latest + volumes: + - mariadb-data:/var/lib/mysql + env: + MYSQL_ROOT_PASSWORD: ietf + MYSQL_DATABASE: ietf_utf8 + MYSQL_USER: django + MYSQL_PASSWORD: RkTkDPFnKpko + steps: + - uses: actions/checkout@v3 + with: + ref: 'feat/postgres' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Migrate + run: | + chmod +x ./docker/scripts/db-pg-migrate.sh + sh ./docker/scripts/db-pg-migrate.sh + - name: Docker Build & Push + uses: docker/build-push-action@v3 + with: + context: . + file: docker/db-pg.Dockerfile + platforms: linux/amd64 + push: true + tags: ghcr.io/ietf-tools/datatracker-db-pg:latest