name: Release 3X-UI for Docker permissions: contents: read packages: write env: CI_IMAGE_NAME: "3x-ui" CI_REGISTRY: "reg.vados.ru" on: workflow_dispatch: push: tags: - "v*.*.*" jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: submodules: true - name: Docker meta id: meta uses: docker/metadata-action@v6 with: images: | reg.vados.ru/3x-ui ghcr.io/vados-dev/3x-ui tags: | type=ref,event=branch type=ref,event=tag type=semver,pattern={{version}},value=lats,match=latest$ labels: | maintainer=${github.actor} org.opencontainers.image.url=https://{{steps.meta.outputs.images}}:{{steps.meta.outputs.tags}} org.opencontainers.image.created={{commit_date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]'}} - name: Set up QEMU uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 with: install: true - name: Login to registry shell: bash run: | set -euo pipefail echo "reg_url=${CI_REGISTRY}" echo "reg_user=${{ vars.REG_USER }}" echo "${{ secrets.REG_PASS }}" | docker login "${reg_url}" -u "${reg_user}" --password-stdin - name: Build and push Docker image uses: docker/build-push-action@v7 with: context: . push: true platforms: linux/amd64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} # uses: docker/login-action@v2 # with: # registry: reg.vados.ru # username: ${{ vars.REG_USER }} # password: ${{ secrets.REG_PASS }} # scope: '${IMAGE_NAME}@push' # - name: Login to registries # uses: docker/login-action@v4 # with: # registry-auth: | # - username: ${{ vars.DOCKER_HUB_USERNAME }} # password: ${{ secrets.DOCKER_HUB_TOKEN }} # - registry: ghcr.io # username: ${{ github.actor }} # password: ${{ secrets.GITHUB_TOKEN }}