Skip to content

builder unofficial

builder unofficial #23

Workflow file for this run

name: builder unofficial
on:
workflow_dispatch:
jobs:
buildx:
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 DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.REPO_TOKEN }}
- name: Lower case dockerhub image name
id: dockerhub_image
uses: ASzc/change-string-case-action@v5
with:
string: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
- name: Lower case github docker image name
id: ghcr_image
uses: ASzc/change-string-case-action@v5
with:
string: ${{ github.repository }}
- name: Build and push with alpha tag
uses: docker/build-push-action@v4
with:
context: build_image
file: ./build_image/Dockerfile.alpha
platforms: linux/amd64,linux/arm64,linux/s390x
push: true
tags: |
${{ steps.dockerhub_image.outputs.lowercase }}:alpha
ghcr.io/${{ steps.ghcr_image.outputs.lowercase }}:alpha
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Apprise-Gotify push
uses: cstuder/apprise-ga@master
with:
title: "镜像发布成功"
message: |
Docker: yesir/xui-docker:alpha
Github: ghcr.io/spysir/xui-docker:alpha
Source: github.com/FranzKafkaYu/x-ui
env:
APPRISE_URL: ${{ secrets.APPRISE_URL }}