3x-ui/.github/workflows/docker.yml

52 lines
1.4 KiB
YAML
Raw Normal View History

2023-05-07 19:59:37 +03:00
name: Release X-ui dockerhub
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Check out the code
2023-05-08 03:05:52 +03:00
uses: actions/checkout@v3
2023-05-07 19:59:37 +03:00
- name: Set up QEMU
2023-05-08 03:05:52 +03:00
uses: docker/setup-qemu-action@v2
2023-05-07 19:59:37 +03:00
- name: Set up Docker Buildx
2023-05-08 03:05:52 +03:00
uses: docker/setup-buildx-action@v2
2023-05-07 19:59:37 +03:00
- name: Log in to GitHub Container Registry
2023-05-08 03:05:52 +03:00
uses: docker/login-action@v2
2023-05-07 19:59:37 +03:00
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
2023-05-08 03:05:52 +03:00
uses: docker/metadata-action@v4
2023-05-07 19:59:37 +03:00
with:
2023-05-07 20:15:30 +03:00
images: ghcr.io/${{ github.repository }}
2023-05-07 19:59:37 +03:00
- name: Build and push Docker image
2023-05-08 03:05:52 +03:00
uses: docker/build-push-action@v4
2023-05-07 19:59:37 +03:00
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
2023-05-08 04:08:04 +03:00
platforms: linux/amd64
2023-05-07 19:59:37 +03:00
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2023-05-08 04:18:25 +03:00
- name: Build and push Docker image ARM64
uses: docker/build-push-action@v4
with:
context: .
file: .github/DockerfileARM
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}