Skip to content

Commit 250ac9b

Browse files
committed
feat: create release on tag with db dump
1 parent 6a2a075 commit 250ac9b

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
# tags:
6+
# - '*.*.*'
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
with:
15+
submodules: recursive
16+
# - name: Set up QEMU
17+
# uses: docker/setup-qemu-action@v3
18+
# - name: Set up Docker Buildx
19+
# id: buildx
20+
# uses: docker/setup-buildx-action@v3
21+
- name: Build
22+
run: |
23+
docker compose -f docker-compose.yml -f docker-compose-dev.yml up -d
24+
make docker-migrate
25+
make docker-build-db
26+
- name: Dump DB
27+
run: docker compose exec -T -u postgres db sh -c "cd /tmp && pg_dump -h localhost -Fc -U ash pokeapi | gzip > pokeapi.dump.zip && ls -larth"
28+
- name: Copy dump
29+
run: |
30+
docker compose cp postgresql:/tmp pokeapi.dump.zip ./
31+
ls -larth
32+
# - name: Release
33+
# uses: softprops/action-gh-release@v2
34+
# if: startsWith(github.ref, 'refs/tags/')
35+
# with:
36+
# draft: true
37+
# fail_on_unmatched_files: true
38+
# files: pokeapi.dump.zip
39+
# generate_release_notes: true

0 commit comments

Comments
 (0)