diff --git a/.github/workflows/eclipse-temurin.yml b/.github/workflows/eclipse-temurin.yml index c4839c5..46c97e7 100644 --- a/.github/workflows/eclipse-temurin.yml +++ b/.github/workflows/eclipse-temurin.yml @@ -59,7 +59,7 @@ jobs: - name: Duplicate eclipse-temurin uses: docker/build-push-action@v5 with: - context: . + context: ./eclipse-temurin file: ./eclipse-temurin/Dockerfile push: true platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/hello-world.yml b/.github/workflows/hello-world.yml index d23bcbd..d9829a0 100644 --- a/.github/workflows/hello-world.yml +++ b/.github/workflows/hello-world.yml @@ -59,7 +59,7 @@ jobs: - name: Duplicate hello-world uses: docker/build-push-action@v5 with: - context: . + context: ./hello-world file: ./hello-world/Dockerfile push: true platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/httpd-webdav.yml b/.github/workflows/httpd-webdav.yml new file mode 100644 index 0000000..46eab88 --- /dev/null +++ b/.github/workflows/httpd-webdav.yml @@ -0,0 +1,70 @@ +name: httpd-webdav + +# 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 + 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 + uses: docker/build-push-action@v5 + with: + context: ./httpd-webdav + file: ./httpd-webdav/Dockerfile + push: true + platforms: linux/amd64,linux/arm64 + provenance: false + tags: | + ${{ env.REGISTRY_ACR }}/${{ env.NAMESPACE_ACR }}/httpd-webdav:latest + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 06c8193..d03f091 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -59,7 +59,7 @@ jobs: - name: Duplicate maven uses: docker/build-push-action@v5 with: - context: . + context: ./maven file: ./maven/Dockerfile push: true platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/mongodb-community-server.yml b/.github/workflows/mongodb-community-server.yml index d09109b..53b6758 100644 --- a/.github/workflows/mongodb-community-server.yml +++ b/.github/workflows/mongodb-community-server.yml @@ -59,7 +59,7 @@ jobs: - name: Duplicate mongodb/mongodb-community-server:4.4.28-ubuntu2004 uses: docker/build-push-action@v5 with: - context: . + context: ./mongo file: ./mongo/Dockerfile push: true platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/neo4j.yml b/.github/workflows/neo4j.yml index cc28c24..b789374 100644 --- a/.github/workflows/neo4j.yml +++ b/.github/workflows/neo4j.yml @@ -59,8 +59,8 @@ jobs: - name: Duplicate neo4j:4.4.35-community uses: docker/build-push-action@v5 with: - context: . - file: ./mongo/Dockerfile + context: ./neo4j + file: ./neo4j/Dockerfile push: true platforms: linux/amd64,linux/arm64 provenance: false diff --git a/.github/workflows/nginx-webdav.yml b/.github/workflows/nginx-webdav.yml index e90a37f..1560a57 100644 --- a/.github/workflows/nginx-webdav.yml +++ b/.github/workflows/nginx-webdav.yml @@ -44,7 +44,7 @@ jobs: uses: docker/metadata-action@v5 with: images: | - ${{ env.REGISTRY_ACR }}/${{ env.NAMESPACE_ACR }}/hello-world + ${{ env.REGISTRY_ACR }}/${{ env.NAMESPACE_ACR }}/nginx-webdav tags: | type=ref,event=branch type=ref,event=pr diff --git a/.github/workflows/postgres.yml b/.github/workflows/postgres.yml index 2aefb15..6695fff 100644 --- a/.github/workflows/postgres.yml +++ b/.github/workflows/postgres.yml @@ -59,7 +59,7 @@ jobs: - name: Duplicate postgres:14.12-alpine uses: docker/build-push-action@v5 with: - context: . + context: ./postgres file: ./postgres/Dockerfile push: true platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/redis.yml b/.github/workflows/redis.yml index e801dd7..0dd6ad0 100644 --- a/.github/workflows/redis.yml +++ b/.github/workflows/redis.yml @@ -59,7 +59,7 @@ jobs: - name: Duplicate redis:6.2.14-alpine uses: docker/build-push-action@v5 with: - context: . + context: ./redis file: ./redis/Dockerfile push: true platforms: linux/amd64,linux/arm64