mirror of
https://github.com/openvk/openvk
synced 2024-11-15 03:31:18 +03:00
Compare commits
No commits in common. "2f1433dcae706a815c5c39450e8b8db4751d341e" and "c6e47f17ff4c1feae4dd8f538140c491201dc603" have entirely different histories.
2f1433dcae
...
c6e47f17ff
1 changed files with 30 additions and 80 deletions
110
.github/workflows/build.yaml
vendored
110
.github/workflows/build.yaml
vendored
|
@ -10,14 +10,10 @@ env:
|
||||||
DB_VERSION: "10.9"
|
DB_VERSION: "10.9"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildbase:
|
build:
|
||||||
name: Build base images
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform: [amd64, arm64]
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
if: github.event_name == 'push'
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
@ -32,99 +28,53 @@ jobs:
|
||||||
with:
|
with:
|
||||||
string: ${{ github.repository }}
|
string: ${{ github.repository }}
|
||||||
|
|
||||||
- name: Base image meta
|
|
||||||
id: basemeta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.BASE_IMAGE_NAME}}
|
|
||||||
tags: |
|
|
||||||
type=sha
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=pr
|
|
||||||
type=ref,event=tag
|
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
|
||||||
|
|
||||||
# - name: Log into registry
|
# - name: Log into registry
|
||||||
# run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
# run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
- name: Build base image
|
- name: Build base image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/${{matrix.platform}}
|
tags: ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.BASE_IMAGE_NAME}}:test
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
file: install/automated/docker/openvk.Dockerfile
|
file: install/automated/docker/openvk.Dockerfile
|
||||||
tags: ${{ steps.basemeta.outputs.tags }}
|
outputs: type=oci,dest=/tmp/openvk.tar
|
||||||
labels: ${{ steps.basemeta.outputs.labels }}
|
|
||||||
build-args: |
|
build-args: |
|
||||||
GITREPO=${{ steps.repositorystring.outputs.lowercase }}
|
GITREPO=${{ steps.repositorystring.outputs.lowercase }}
|
||||||
|
|
||||||
builddb:
|
|
||||||
name: Build DB images
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform: [amd64, arm64]
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Change repository string to lowercase
|
|
||||||
id: repositorystring
|
|
||||||
uses: Entepotenz/change-string-case-action-min-dependencies@v1.1.0
|
|
||||||
with:
|
|
||||||
string: ${{ github.repository }}
|
|
||||||
|
|
||||||
- name: MariaDB primary meta
|
|
||||||
id: db-primarymeta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}
|
|
||||||
tags: |
|
|
||||||
type=sha,prefix=${{env.DB_VERSION}}-primary-sha-
|
|
||||||
type=ref,event=branch,prefix=${{env.DB_VERSION}}-primary-
|
|
||||||
type=ref,event=pr,prefix=${{env.DB_VERSION}}-primary-pr-
|
|
||||||
type=ref,event=tag,prefix=${{env.DB_VERSION}}-primary-
|
|
||||||
type=raw,value=${{env.DB_VERSION}}-primary,enable={{is_default_branch}}
|
|
||||||
|
|
||||||
- name: MariaDB event meta
|
|
||||||
id: db-eventmeta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}
|
|
||||||
tags: |
|
|
||||||
type=sha,prefix=${{env.DB_VERSION}}-eventdb-sha-
|
|
||||||
type=ref,event=branch,prefix=${{env.DB_VERSION}}-eventdb-
|
|
||||||
type=ref,event=pr,prefix=${{env.DB_VERSION}}-eventdb-pr-
|
|
||||||
type=ref,event=tag,prefix=${{env.DB_VERSION}}-eventdb-
|
|
||||||
type=raw,value=${{env.DB_VERSION}}-eventdb,enable={{is_default_branch}}
|
|
||||||
|
|
||||||
# - name: Log into registry
|
|
||||||
# run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
|
||||||
|
|
||||||
- name: Build MariaDB primary image
|
- name: Build MariaDB primary image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/${{matrix.platform}}
|
tags: ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}:${{env.DB_VERSION}}-primary
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
file: install/automated/docker/mariadb-primary.Dockerfile
|
file: install/automated/docker/mariadb-primary.Dockerfile
|
||||||
tags: ${{ steps.db-primarymeta.outputs.tags }}
|
outputs: type=oci,dest=/tmp/mariadb-primary.tar
|
||||||
labels: ${{ steps.db-primarymeta.outputs.labels }}
|
|
||||||
build-args: |
|
build-args: |
|
||||||
VERSION=${{env.DB_VERSION}}
|
VERSION=${{env.DB_VERSION}}
|
||||||
|
|
||||||
- name: Build MariaDB event image
|
- name: Build MariaDB event image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/${{matrix.platform}}
|
tags: ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}:${{env.DB_VERSION}}-eventdb
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
file: install/automated/docker/mariadb-eventdb.Dockerfile
|
file: install/automated/docker/mariadb-eventdb.Dockerfile
|
||||||
tags: ${{ steps.db-eventmeta.outputs.tags }}
|
outputs: type=oci,dest=/tmp/mariadb-eventdb.tar
|
||||||
labels: ${{ steps.db-eventmeta.outputs.labels }}
|
|
||||||
build-args: |
|
build-args: |
|
||||||
VERSION=${{env.DB_VERSION}}
|
VERSION=${{env.DB_VERSION}}
|
||||||
|
|
||||||
|
- name: Upload base image as an artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: openvk
|
||||||
|
path: /tmp/openvk.tar
|
||||||
|
|
||||||
|
- name: Upload MariaDB primary as an artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: mariadb-primary
|
||||||
|
path: /tmp/mariadb-primary.tar
|
||||||
|
|
||||||
|
- name: Upload MariaDB event as an artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: mariadb-eventdb
|
||||||
|
path: /tmp/mariadb-eventdb.tar
|
Loading…
Reference in a new issue