mirror of
https://github.com/PaiGramTeam/telegram-bot-api-build.git
synced 2024-11-25 17:35:28 +00:00
commit
a38657b887
26
.github/workflows/multiarch.yml
vendored
26
.github/workflows/multiarch.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
IMAGE_TAG: ${{ secrets.DOCKERHUB_OWNER }}/telegram-bot-api
|
IMAGE_TAG: ${{ secrets.DOCKERHUB_OWNER }}/telegram-bot-api
|
||||||
ALPINE_VERSION: 3.19
|
ALPINE_VERSION: '3.20'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch:
|
arch:
|
||||||
@ -26,10 +26,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout current repo
|
- name: Checkout current repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4.1.6
|
||||||
|
|
||||||
- name: Checkout upstream repo
|
- name: Checkout upstream repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4.1.6
|
||||||
with:
|
with:
|
||||||
repository: tdlib/telegram-bot-api
|
repository: tdlib/telegram-bot-api
|
||||||
path: telegram-bot-api
|
path: telegram-bot-api
|
||||||
@ -62,19 +62,19 @@ jobs:
|
|||||||
cat $GITHUB_ENV > github.env
|
cat $GITHUB_ENV > github.env
|
||||||
|
|
||||||
- name: Upload environment info as artifact
|
- name: Upload environment info as artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3.0.0
|
||||||
with:
|
with:
|
||||||
name: github_env
|
name: github_env
|
||||||
path: github.env
|
path: github.env
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v3.0.0
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v3.3.0
|
||||||
|
|
||||||
- name: Cache Docker layers
|
- name: Cache Docker layers
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4.0.2
|
||||||
with:
|
with:
|
||||||
path: /tmp/.buildx-cache
|
path: /tmp/.buildx-cache
|
||||||
key: ${{ runner.os }}-buildx-${{ env.SAFE_ARCH }}-${{ github.sha }}
|
key: ${{ runner.os }}-buildx-${{ env.SAFE_ARCH }}-${{ github.sha }}
|
||||||
@ -82,14 +82,14 @@ jobs:
|
|||||||
${{ runner.os }}-buildx-${{ env.SAFE_ARCH }}-
|
${{ runner.os }}-buildx-${{ env.SAFE_ARCH }}-
|
||||||
|
|
||||||
- name: Login to Docker Hub registry
|
- name: Login to Docker Hub registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3.2.0
|
||||||
if: ${{ github.event_name != 'pull_request' }}
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_LOGIN }}
|
username: ${{ secrets.DOCKERHUB_LOGIN }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v5.3.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
@ -114,7 +114,7 @@ jobs:
|
|||||||
docker save ${{ env.IMAGE_TAG }}:${{ env.VERSION }}-${{ env.SAFE_ARCH }} -o ${{ env.SAFE_ARCH }}.tar
|
docker save ${{ env.IMAGE_TAG }}:${{ env.VERSION }}-${{ env.SAFE_ARCH }} -o ${{ env.SAFE_ARCH }}.tar
|
||||||
|
|
||||||
- name: Upload image as artifact
|
- name: Upload image as artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3.0.0
|
||||||
with:
|
with:
|
||||||
name: image_${{ env.SAFE_ARCH }}
|
name: image_${{ env.SAFE_ARCH }}
|
||||||
path: ${{ env.SAFE_ARCH }}.tar
|
path: ${{ env.SAFE_ARCH }}.tar
|
||||||
@ -129,7 +129,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v4.1.7
|
||||||
|
|
||||||
- name: Load environment info and built images
|
- name: Load environment info and built images
|
||||||
run: |
|
run: |
|
||||||
@ -142,14 +142,14 @@ jobs:
|
|||||||
docker load --input image_linuxppc64le/linuxppc64le.tar
|
docker load --input image_linuxppc64le/linuxppc64le.tar
|
||||||
|
|
||||||
- name: Login to ghcr registry
|
- name: Login to ghcr registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3.2.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Login to Docker Hub registry
|
- name: Login to Docker Hub registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3.2.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_LOGIN }}
|
username: ${{ secrets.DOCKERHUB_LOGIN }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
Loading…
Reference in New Issue
Block a user