Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

🐛Update github action webdav provider #74

🐛Update github action webdav provider

🐛Update github action webdav provider #74

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build Docker Image
# Controls when the action will run.
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
# schedule:
# - cron: "0 0 * * */3"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
env:
TZ: Asia/Shanghai
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
buildx:
runs-on: ${{ matrix.target.os }}
strategy:
matrix:
target:
- { os: self-hosted, arch: arm64, suffix: linux }
- { os: ubuntu-22.04, arch: amd64, suffix: linux }
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Fixup docker permission denied
run: sudo chmod 777 /var/run/docker.sock
if: matrix.target.os == 'self-hosted'
-
name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
-
name: Setup Gradle
uses: gradle/gradle-build-action@v2
-
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
run: chmod +x ${{github.workspace}}/gradlew
# Set VERSION_INFORMATION
-
run: echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q ciPrintVersionInformation)" >> $GITHUB_ENV
-
name: Build Docker Image
run: >
docker buildx build --cache-from type=gha --cache-to type=gha,mode=max
-t eritpchy/webdav-aliyundriver:${{ env.VERSION_INFORMATION }}-${{ matrix.target.arch }}
-t eritpchy/aliyundrive-webdav:${{ env.VERSION_INFORMATION }}-${{ matrix.target.arch }} .
-
name: Push Docker Image eritpchy/webdav-aliyundriver:latest(OLD)
run: docker push eritpchy/webdav-aliyundriver:${{ env.VERSION_INFORMATION }}-${{ matrix.target.arch }}
-
name: Push Docker Image eritpchy/aliyundrive-webdav:latest
run: docker push eritpchy/aliyundrive-webdav:${{ env.VERSION_INFORMATION }}-${{ matrix.target.arch }}
publish:
needs: buildx
runs-on: ubuntu-22.04
steps:
-
name: Checkout
uses: actions/checkout@v3
-
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
-
run: chmod +x ${{github.workspace}}/gradlew
# Set VERSION_INFORMATION
-
run: echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q ciPrintVersionInformation)" >> $GITHUB_ENV
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Create Docker Manifest for eritpchy/webdav-aliyundriver:latest(OLD)
run: |
docker manifest create eritpchy/webdav-aliyundriver:latest \
--amend eritpchy/webdav-aliyundriver:${{ env.VERSION_INFORMATION }}-amd64 \
--amend eritpchy/webdav-aliyundriver:${{ env.VERSION_INFORMATION }}-arm64
-
name: Push Docker Manifest for eritpchy/webdav-aliyundriver:latest(OLD)
run: docker manifest push eritpchy/webdav-aliyundriver:latest
-
name: Create Docker Manifest for eritpchy/aliyundrive-webdav:latest
run: |
docker manifest create eritpchy/aliyundrive-webdav:latest \
--amend eritpchy/aliyundrive-webdav:${{ env.VERSION_INFORMATION }}-amd64 \
--amend eritpchy/aliyundrive-webdav:${{ env.VERSION_INFORMATION }}-arm64
-
name: Push Docker Manifest for eritpchy/aliyundrive-webdav:latest
run: docker manifest push eritpchy/aliyundrive-webdav:latest