mirror of
https://github.com/PaiGramTeam/Docker.git
synced 2024-11-21 21:48:04 +00:00
Update Dockerfile
This commit is contained in:
parent
75084b4fa4
commit
9a75cd5d8f
56
.github/workflows/miboogram.yml
vendored
Normal file
56
.github/workflows/miboogram.yml
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
name: "MibooGram Docker Build"
|
||||||
|
|
||||||
|
# Controls when the action will run.
|
||||||
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the master branch
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tags:
|
||||||
|
description: 'main version tag, example: v4'
|
||||||
|
required: true
|
||||||
|
default: 'v4'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: docker build and publish
|
||||||
|
env:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||||
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
DOCKERHUB_REPOSITORY: ${{ vars.DOCKER_MIBOOGRAM_REPO }}
|
||||||
|
DOCKER_TAG: ${{ github.event.inputs.tags }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
|
- name: Setup Docker Buildx
|
||||||
|
uses: crazy-max/ghaction-docker-buildx@v3
|
||||||
|
|
||||||
|
- name: Buildx cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
id: buildx-cache
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx
|
||||||
|
|
||||||
|
- name: Download Dockerfile
|
||||||
|
run: |
|
||||||
|
wget -O Dockerfile https://raw.githubusercontent.com/PaiGramTeam/MibooGram/zzz/Dockerfile
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
||||||
|
--cache-to "type=local,dest=/tmp/.buildx-cache" \
|
||||||
|
--output "type=image,push=true" \
|
||||||
|
--platform "linux/amd64,linux/arm64/v8" \
|
||||||
|
--tag "${DOCKERHUB_REPOSITORY}:${DOCKER_TAG}" \
|
||||||
|
-f Dockerfile \
|
||||||
|
.
|
56
.github/workflows/paigram.yml
vendored
Normal file
56
.github/workflows/paigram.yml
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
name: "PaiGram Docker Build"
|
||||||
|
|
||||||
|
# Controls when the action will run.
|
||||||
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the master branch
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tags:
|
||||||
|
description: 'main version tag, example: v4'
|
||||||
|
required: true
|
||||||
|
default: 'v4'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: docker build and publish
|
||||||
|
env:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||||
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
DOCKERHUB_REPOSITORY: ${{ vars.DOCKER_PAIGRAM_REPO }}
|
||||||
|
DOCKER_TAG: ${{ github.event.inputs.tags }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
|
- name: Setup Docker Buildx
|
||||||
|
uses: crazy-max/ghaction-docker-buildx@v3
|
||||||
|
|
||||||
|
- name: Buildx cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
id: buildx-cache
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx
|
||||||
|
|
||||||
|
- name: Download Dockerfile
|
||||||
|
run: |
|
||||||
|
wget -O Dockerfile https://raw.githubusercontent.com/PaiGramTeam/PaiGram/main/Dockerfile
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
||||||
|
--cache-to "type=local,dest=/tmp/.buildx-cache" \
|
||||||
|
--output "type=image,push=true" \
|
||||||
|
--platform "linux/amd64,linux/arm64/v8" \
|
||||||
|
--tag "${DOCKERHUB_REPOSITORY}:${DOCKER_TAG}" \
|
||||||
|
-f Dockerfile \
|
||||||
|
.
|
@ -1,4 +1,4 @@
|
|||||||
name: "Docker Build"
|
name: "PamGram Docker Build"
|
||||||
|
|
||||||
# Controls when the action will run.
|
# Controls when the action will run.
|
||||||
on:
|
on:
|
||||||
@ -18,7 +18,7 @@ jobs:
|
|||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
DOCKER_CLI_EXPERIMENTAL: enabled
|
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
DOCKERHUB_REPOSITORY: ${{ secrets.DOCKER_REPO }}
|
DOCKERHUB_REPOSITORY: ${{ vars.DOCKER_PAMGRAM_REPO }}
|
||||||
DOCKER_TAG: ${{ github.event.inputs.tags }}
|
DOCKER_TAG: ${{ github.event.inputs.tags }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -42,7 +42,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Download Dockerfile
|
- name: Download Dockerfile
|
||||||
run: |
|
run: |
|
||||||
wget -O Dockerfile https://raw.githubusercontent.com/luoshuijs/TGPaimonBot/main/Dockerfile
|
wget -O Dockerfile https://raw.githubusercontent.com/PaiGramTeam/PamGram/sr/Dockerfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
Loading…
Reference in New Issue
Block a user