Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
IamTaoChen committed Nov 19, 2024
1 parent d16f6e9 commit 8eef15d
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,75 @@ jobs:
target/${{ matrix.job.target }}/release/rustdesk-utils
if-no-files-found: error

# docker build and push of single-arch images
docker:

name: Docker push - ${{ matrix.job.name }}
needs: build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
job:
- { name: "amd64", docker_platform: "linux/amd64", s6_platform: "x86_64" }
- { name: "arm64v8", docker_platform: "linux/arm64", s6_platform: "aarch64" }
- { name: "armv7", docker_platform: "linux/arm/v7", s6_platform: "armhf" }
- { name: "i386", docker_platform: "linux/386", s6_platform: "i686" }

steps:

- name: Checkout
uses: actions/checkout@v3

- name: Download binaries
uses: actions/download-artifact@v3
with:
name: binaries-linux-${{ matrix.job.name }}
path: docker/rootfs/usr/bin

- name: Make binaries executable
run: chmod -v a+x docker/rootfs/usr/bin/*

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: registry.hub.docker.com/${{ secrets.DOCKER_IMAGE }}

- name: Get git tag
id: vars
run: |
T=${GITHUB_REF#refs/*/}
M=${T%%.*}
echo "GIT_TAG=$T" >> $GITHUB_ENV
echo "MAJOR_TAG=$M" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: "./docker"
platforms: ${{ matrix.job.docker_platform }}
push: false
provenance: false
build-args: |
S6_ARCH=${{ matrix.job.s6_platform }}
tags: |
${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-${{ matrix.job.name }}
labels: ${{ steps.meta.outputs.labels }}

# docker build and push of multiarch images
docker-manifest:

Expand Down

0 comments on commit 8eef15d

Please sign in to comment.