try fixing the kernel module building #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push Sing-box Docker Image | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'singbox/**' | |
- '.github/workflows/singbox-build-push.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'singbox/**' | |
- '.github/workflows/singbox-build-push.yml' | |
workflow_dispatch: # Allow manual triggering | |
schedule: | |
- cron: '0 0 * * 0' # Run weekly to check for new sing-box versions | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get Sing-box version | |
id: singbox_version | |
run: | | |
SINGBOX_VERSION=$(curl -s https://api.github.com/repos/SagerNet/sing-box/releases/latest | jq -r .tag_name) | |
echo "version=${SINGBOX_VERSION#v}" >> $GITHUB_OUTPUT | |
echo "SINGBOX_VERSION=${SINGBOX_VERSION#v}" >> $GITHUB_ENV | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./singbox | |
file: ./singbox/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
build-args: | | |
SINGBOX_VERSION=${{ env.SINGBOX_VERSION }} | |
tags: | | |
ghcr.io/${{ github.repository_owner }}/singbox:latest | |
ghcr.io/${{ github.repository_owner }}/singbox:${{ env.SINGBOX_VERSION }} |