Skip to content

ci: remove db artifact #124

ci: remove db artifact

ci: remove db artifact #124

Workflow file for this run

name: release
on:
push:
branches: [ main ]
jobs:
build-mariadb:
if: "contains(github.event.head_commit.message, '#release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PA_TOKEN }}
submodules: true
- name: Docker login
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin
- uses: benjlevesque/short-sha@v2.2
id: short-sha
- name: Set build tag
run: echo "DOCKER_IMAGE_TAG=${{ steps.short-sha.outputs.sha }}-$(date +%s)" >> $GITHUB_ENV
- name: Build container
run: docker build -f docker/mariadb/Dockerfile -t ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }} .
- name: Publish container
run: |
docker push ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }}
docker tag ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }} ghcr.io/gurbaninow/database:latest
docker tag ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }} ghcr.io/gurbaninow/database:dev
docker push ghcr.io/gurbaninow/database:latest
docker push ghcr.io/gurbaninow/database:dev
build-sqlite:
if: "contains(github.event.head_commit.message, '#release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PA_TOKEN }}
submodules: true
- uses: actions/setup-node@v3
- run: npm ci
- name: Build database
run: npm run build-sqlite
backport:
if: "contains(github.event.head_commit.message, '#release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PA_TOKEN }}
submodules: true
- uses: actions/setup-node@v3
- run: npm ci
- name: Backport data
run: npm run backport
- name: Checkout shabados/database:main
run: git clone --depth 1 --branch 4.8.7 https://github.com/shabados/database.git ../shabados
- name: Copy backported data
run: rm -rf ../shabados/data && cp -r data ../shabados/
- name: Docker login
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin
- uses: benjlevesque/short-sha@v2.2
id: short-sha
- name: Set build tag
run: echo "DOCKER_IMAGE_TAG=4-${{ steps.short-sha.outputs.sha }}-$(date +%s)" >> $GITHUB_ENV
- name: Build container
working-directory: ../shabados
run: docker build -f docker/mariadb/Dockerfile -t ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }} .
- name: Publish container
working-directory: ../shabados
run: docker push ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }}