name: Build & Release on: push: branches: - master paths: - Dockerfile env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} jobs: build: name: Setup runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@master - name: Set Version id: set-version run: | VERSION="1.0.0" BAIDUNETDISK_VERSION="4.17.7" echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT echo "BAIDUNETDISK_VERSION=${BAIDUNETDISK_VERSION}" >> $GITHUB_OUTPUT - name: Docker meta id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=raw,value=${{ steps.set-version.outputs.VERSION }} type=raw,value=latest - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Buildx uses: docker/build-push-action@v5 with: context: . file: Dockerfile platforms: | linux/amd64 push: true build-args: | BUILD_DATE=${GITHUB_DATE} VERSION=${VERSION} BAIDUNETDISK_VERSION=${BAIDUNETDISK_VERSION} labels: ${{ steps.meta.outputs.labels }} tags: ${{ steps.meta.outputs.tags }}