fix: background_threads_runtime_support
for musl target
#23
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 | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
permissions: | |
packages: write | |
contents: write | |
env: | |
JEMALLOC_SYS_WITH_MALLOC_CONF: narenas:1,dirty_decay_ms:0,muzzy_decay_ms:0,abort_conf:true | |
IMAGE: ghcr.io/yeecord/api-proxy-rs | |
jobs: | |
build-x86: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to ghcr | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
tags: ${{ env.IMAGE }}:${{ github.sha }}-x86 | |
build-arm64: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to ghcr | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
tags: ${{ env.IMAGE }}:${{ github.sha }}-arm64 | |
create-manifest: | |
runs-on: ubuntu-latest | |
needs: | |
- build-x86 | |
- build-arm64 | |
steps: | |
- name: Log in to ghcr | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create SHA manifest and push | |
run: | | |
docker manifest create \ | |
${{ env.IMAGE }}:${{ github.sha }} \ | |
--amend ${{ env.IMAGE }}:${{ github.sha }}-x86 \ | |
--amend ${{ env.IMAGE }}:${{ github.sha }}-arm64 | |
docker manifest push ${{ env.IMAGE }}:${{ github.sha }} | |
- name: Create latest manifest and push | |
run: | | |
docker manifest create \ | |
${{ env.IMAGE }}:latest \ | |
--amend ${{ env.IMAGE }}:latest-x86 \ | |
--amend ${{ env.IMAGE }}:latest-arm64 | |
docker manifest push ${{ env.IMAGE }}:latest |