mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: Build Docker Images
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-docker-image:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
bin:
|
|
- ssserver
|
|
- sslocal
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Setup Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Docker metadata
|
|
id: metadata
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ghcr.io/${{ github.repository_owner }}/${{ matrix.bin }}-rust
|
|
- name: Build and release Docker images
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: linux/386,linux/amd64,linux/arm64/v8
|
|
target: ${{ matrix.bin }}
|
|
tags: ${{ steps.metadata.outputs.tags }}
|
|
push: true
|