Skip to content

builder x-ui_alpine_image #4

builder x-ui_alpine_image

builder x-ui_alpine_image #4

name: builder x-ui_alpine_image
on:
workflow_dispatch:
env:
x-ui_alpine_v: 0.3.4.4
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
#with:
#submodules: true
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
#-
#name: Lower case dockerhub image name
#id: dockerhub_image
#uses: ASzc/change-string-case-action@v5
#with:
#string: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.PACKAGE_C }}
-
name: Build and push with x-ui_alpine
uses: docker/build-push-action@v4
with:
context: build_image/x-ui
file: ./build_image/x-ui/Dockerfile_alpine
platforms: linux/amd64
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/x-ui_alpine:${{ env.x-ui_alpine_v }}
${{ secrets.DOCKERHUB_USERNAME }}/x-ui_alpine
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
#-
#name: Sync README.md
#uses: ms-jpq/sync-dockerhub-readme@v1
#with:
#username: ${{ secrets.DOCKERHUB_USERNAME }}
#password: ${{ secrets.DOCKERHUB_TOKEN }}
#repository: ${{ secrets.DOCKERHUB_USERNAME }}/x-ui
#readme: "./docs/README_xui.md"
-
name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache