Skip to content

Commit 4196ee3

Browse files
committed
- fixed publisher script and docker
1 parent eee24a8 commit 4196ee3

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

.github/workflows/publish-sanitized-db.yaml

+13-6
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,22 @@ jobs:
2222
- name: Fetch sanitized backup
2323
run: |
2424
s3cmd get s3://${{ vars.S3_BUCKET }}/latest.sanitized publisher/sanitized/latest.sanitized
25+
s3cmd get s3://${{ vars.S3_BUCKET }}/plyo-db/latest_roles.out publisher/sanitized/latest_roles.out
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v2
28+
with:
29+
platforms: "linux/amd64,linux/arm64"
2530
- name: Login to registry
2631
uses: docker/login-action@v2
2732
with:
2833
registry: ${{ vars.REGISTRY }}
2934
username: ${{ secrets.REGISTRY_USER }}
3035
password: ${{ secrets.REGISTRY_PASS }}
31-
- name: Build DB image
32-
run: |
33-
image="${{ vars.REGISTRY }}/db:data"
34-
docker build -t ${image} -f ./publisher/Dockerfile ./publisher
35-
docker push ${image}
36-
36+
- name: Build and push docker image
37+
uses: docker/build-push-action@v3
38+
with:
39+
context: ./publisher
40+
platforms: "linux/amd64,linux/arm64"
41+
push: true
42+
tags: '${{ vars.REGISTRY }}/db:data'
43+

publisher/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM plyo/postgres:database-7.3.0-14.1
1+
FROM plyo/postgres:database-7.3.0-13.1
22

33
COPY ./sanitized/latest.sanitized /dumps/db.backup
4+
COPY ./sanitized/latest_roles.out /dumps/roles.backup
45
COPY ./restore.sh /docker-entrypoint-initdb.d/

publisher/restore.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
psql -f /dumps/roles.backup -U postgres
12
pg_restore /dumps/db.backup -U postgres -d ${DB_NAME}

0 commit comments

Comments
 (0)