|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | +# contributor license agreements. See the NOTICE file distributed with |
| 4 | +# this work for additional information regarding copyright ownership. |
| 5 | +# The ASF licenses this file to you under the Apache License, Version 2.0 |
| 6 | +# (the "License"); you may not use this file except in compliance with |
| 7 | +# the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | + |
| 18 | +name: build |
| 19 | + |
| 20 | +on: |
| 21 | + push: |
| 22 | + branches: |
| 23 | + - "trunk" |
| 24 | + - "release/*" |
| 25 | + paths-ignore: |
| 26 | + - "**.adoc" |
| 27 | + - "**.md" |
| 28 | + - "**.txt" |
| 29 | + pull_request: |
| 30 | + paths-ignore: |
| 31 | + - "**.adoc" |
| 32 | + - "**.md" |
| 33 | + - "**.txt" |
| 34 | + |
| 35 | +# If the branch is 'trunk' run once per commit. |
| 36 | +# If the branch is 'release/*' allow only one concurrent run. |
| 37 | +concurrency: |
| 38 | + group: ${{ github.ref_name == 'trunk' && github.ref || github.ref_name }} |
| 39 | + cancel-in-progress: true |
| 40 | + |
| 41 | +permissions: read-all |
| 42 | + |
| 43 | +jobs: |
| 44 | + |
| 45 | + build: |
| 46 | + if: github.actor != 'dependabot[bot]' |
| 47 | + uses: apache/logging-parent/.github/workflows/build-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0 |
| 48 | + with: |
| 49 | + java-version: 8 |
| 50 | + |
| 51 | + deploy-snapshot: |
| 52 | + needs: build |
| 53 | + if: github.repository == 'apache/flume' && github.ref == 'refs/heads/trunk' |
| 54 | + uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0 |
| 55 | + # Secrets for deployments |
| 56 | + secrets: |
| 57 | + NEXUS_USER: ${{ secrets.NEXUS_USER }} |
| 58 | + NEXUS_PW: ${{ secrets.NEXUS_PW }} |
| 59 | + with: |
| 60 | + java-version: 8 |
| 61 | + |
| 62 | + deploy-release: |
| 63 | + needs: build |
| 64 | + if: github.repository == 'apache/flume' && startsWith(github.ref_name, 'release/') |
| 65 | + uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0 |
| 66 | + # Secrets for deployments |
| 67 | + secrets: |
| 68 | + GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }} |
| 69 | + LOGGING_STAGE_DEPLOYER_USER: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }} |
| 70 | + LOGGING_STAGE_DEPLOYER_PW: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }} |
| 71 | + SVN_USERNAME: ${{ secrets.LOGGING_SVN_DEV_USERNAME }} |
| 72 | + SVN_PASSWORD: ${{ secrets.LOGGING_SVN_DEV_PASSWORD }} |
| 73 | + # Write permissions to allow the Maven `revision` property update, changelog release, etc. |
| 74 | + permissions: |
| 75 | + contents: write |
| 76 | + with: |
| 77 | + java-version: 8 |
| 78 | + project-id: flume |
| 79 | + site-enabled: true |
0 commit comments