Skip to content

Commit

Permalink
Add webdav used by kt1
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyzlj committed Jul 14, 2024
1 parent 4d65c17 commit 4be2fc8
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/httpd-webdav-kt1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: httpd-webdav-kt1

# Configures this workflow to run every time a change is pushed to the branches.
on:
push:
branches:
- 'main'

# Defines custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
## aliyun ACR
REGION_ID_ACR: cn-hangzhou
REGISTRY_ACR: registry.cn-hangzhou.aliyuncs.com
NAMESPACE_ACR: onesis-geomodels

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
# permissions: write-all
permissions:
contents: read
packages: write
attestations: write
id-token: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v4

# login alibaba Container Registry
- name: Login to ACR
uses: aliyun/acr-login@v1
with:
login-server: https://registry.cn-hangzhou.aliyuncs.com
region-id: cn-hangzhou
username: "${{ secrets.ACR_USERNAME }}"
password: "${{ secrets.ACR_PASSWORD }}"

# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY_ACR }}/${{ env.NAMESPACE_ACR }}/httpd-webdav-kt1
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Duplicate httpd-webdav-kt1
uses: docker/build-push-action@v5
with:
context: ./kt1-webdav
file: ./kt1-webdav/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
provenance: false
tags: |
${{ env.REGISTRY_ACR }}/${{ env.NAMESPACE_ACR }}/httpd-webdav-kt1:2.4.37-20231107
cache-from: type=gha
cache-to: type=gha,mode=max
2 changes: 2 additions & 0 deletions kt1-webdav/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

FROM repos.kunfu.tech:1443/geobeans/plat/webdav:2.4.37-20231107

0 comments on commit 4be2fc8

Please sign in to comment.