Compare commits
No commits in common. "main" and "v0.0.5" have entirely different histories.
50
.github/workflows/docker-image.yml
vendored
50
.github/workflows/docker-image.yml
vendored
@ -2,14 +2,7 @@ name: Build Docker Image And Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
# on:
|
||||
# push:
|
||||
# tags: [ 'v*.*.*' ]
|
||||
tags: [ 'v*.*.*' ]
|
||||
|
||||
env:
|
||||
PHP_EXTENSION_INSTALL_VERSION: 'latest'
|
||||
@ -17,49 +10,29 @@ env:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build PHP 8.0
|
||||
runs-on: ubuntu-latest
|
||||
name: Build PHP ${{ matrix.php-version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
container: catthehacker/ubuntu:act-latest
|
||||
env:
|
||||
PHP_CLI_VERSION: 8.0-cli-alpine
|
||||
PHP_CLI_VERSION: ${{ matrix.php-version }}-cli-alpine
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
php-version: ['8.0']
|
||||
max-parallel: 8
|
||||
steps:
|
||||
- name: Login to Git Docker Hub
|
||||
# https://github.com/docker/login-action#docker-hub
|
||||
uses: http://git.des8.com/docker/login-action@master
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.des8.com
|
||||
username: ${{ secrets.HUB_USERNAME }}
|
||||
password: ${{ secrets.HUB_PASSWORD }}
|
||||
|
||||
- name: Checkout
|
||||
uses: http://git.des8.com/docker/checkout@main
|
||||
with:
|
||||
username: ${{ secrets.HUB_USERNAME }}
|
||||
password: ${{ secrets.HUB_PASSWORD }}
|
||||
repository: heibai2006/webman-docker
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: https://git.des8.com/docker/setup-buildx-action@v2.6.0
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||
with:
|
||||
images: ${{ secrets.HUB_USERNAME }}/webman-docker
|
||||
|
||||
- name: Build and push
|
||||
# https://github.com/docker/build-push-action
|
||||
uses: http://git.des8.com/docker/build-push-action@master
|
||||
env:
|
||||
# 必需有且置空,查看官方文档解释:https://docs.gitea.com/zh-cn/next/usage/actions/comparison?_highlight=build&_highlight=push&_highlight=action#dockerbuild-push-actionv4
|
||||
ACTIONS_RUNTIME_TOKEN: ''
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
username: ${{ secrets.HUB_USERNAME }}
|
||||
password: ${{ secrets.HUB_PASSWORD }}
|
||||
repository: heibai2006/webman-docker
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
build-args: |
|
||||
PHP_CLI_VERSION=${{ env.PHP_CLI_VERSION }}
|
||||
PHP_EXTENSION_INSTALL_VERSION=${{ env.PHP_EXTENSION_INSTALL_VERSION }}
|
||||
@ -68,4 +41,3 @@ jobs:
|
||||
tags: |
|
||||
${{ secrets.HUB_USERNAME }}/webman-docker:${{ env.PHP_CLI_VERSION }}
|
||||
${{ secrets.HUB_USERNAME }}/webman-docker:${{ env.PHP_CLI_VERSION }}${{ github.ref_type == 'tag' && format('-{0}', github.ref_name) || '' }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
@ -1,5 +1,5 @@
|
||||
# https://hub.docker.com/_/php
|
||||
ARG PHP_CLI_VERSION=8.0-cli-alpine
|
||||
ARG PHP_CLI_VERSION=8.1-cli-alpine
|
||||
# https://hub.docker.com/r/mlocati/php-extension-installer
|
||||
ARG PHP_EXTENSION_INSTALL_VERSION=latest
|
||||
# https://hub.docker.com/r/composer/composer
|
||||
|
Loading…
Reference in New Issue
Block a user