Skip to content

Commit

Permalink
Merge pull request #238 from AliMD/feat/deploy-workflows
Browse files Browse the repository at this point in the history
New container: TDLib!
  • Loading branch information
alimd authored Aug 27, 2022
2 parents a14b835 + e0ac726 commit 286de83
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/publish-container.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Container Publish
name: Publish Containers

on:
workflow_dispatch:

push:
branches:
- next
Expand All @@ -12,6 +14,7 @@ on:
pull_request:
paths:
- 'packages/container/**'
- '.github/workflows/publish-container.yml'
branches:
- next

Expand All @@ -30,6 +33,13 @@ jobs:
matrix:
include:
- image: alpine
version:
short: 3
full: 3.16
- image: tdlib
version:
short: 1
full: 1.8

permissions:
contents: read
Expand All @@ -50,8 +60,10 @@ jobs:
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{version}},prefix=alwatr-
type=semver,pattern={{major}}.{{minor}},prefix=alwatr-
type=raw,value=${{matrix.version.short}}
type=raw,value=${{matrix.version.full}}
- name: Install cosign
if: github.event_name != 'pull_request'
Expand Down
28 changes: 28 additions & 0 deletions packages/container/tdlib/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ARG ALPINE_VERSION=3.16
FROM ghcr.io/alimd/alpine:${ALPINE_VERSION}

ARG TDLIB_VERSION=1.8.0
RUN set -ex; \
apk add --no-cache --virtual .build-deps \
curl \
ca-certificates \
g++ \
make \
cmake \
gperf \
libressl-dev \
zlib-dev \
zlib-static \
linux-headers; \
curl -sSLo tdlib.tar.gz https://github.com/tdlib/td/archive/refs/tags/v${TDLIB_VERSION}.tar.gz; \
mkdir /tmp/td/ && cd /tmp/td/; \
tar -xzvf tdlib.tar.gz && cd td-${TDLIB_VERSION}; \
mkdir build && cd build; \
cmake -DCMAKE_BUILD_TYPE=Release ..; \
ls -lAhFtr; \
cmake --build .; \
ls -lAhFtr; \
make install; \
ls -lAhFtr /usr/local/lib/; \
apk del .build-deps; \
rm -rfv /tmp/td/;

0 comments on commit 286de83

Please sign in to comment.