-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.4 KB
/
publish-sanitized-db.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: DB Docker Publisher
on:
workflow_dispatch: ~
# schedule:
# # * is a special character in YAML so you have to quote this string
# - cron: '0 * * * *'
jobs:
deploy:
name: Build sanitized DB dump into docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up S3cmd cli tool
uses: s3-actions/[email protected]
with:
provider: digitalocean
region: '${{ vars.S3_REGION }}'
access_key: ${{ secrets.S3_KEY }}
secret_key: ${{ secrets.S3_SECRET_KEY }}
- name: Fetch sanitized backup
run: |
s3cmd get s3://${{ vars.S3_BUCKET }}/latest.sanitized publisher/sanitized/latest.sanitized
s3cmd get s3://${{ vars.S3_BUCKET }}/plyo-db/latest_roles.out publisher/sanitized/latest_roles.out
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: "linux/amd64,linux/arm64"
- name: Login to registry
uses: docker/login-action@v2
with:
registry: ${{ vars.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASS }}
- name: Build and push docker image
uses: docker/build-push-action@v3
with:
context: ./publisher
platforms: "linux/amd64,linux/arm64"
push: true
tags: '${{ vars.REGISTRY }}/db:data'