mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-4653] Migrate release workflow to GHA (#3027)
* [ACA-4653] Run ACA upstream on schedule * [ACA-4653] Migrate release workflow to GHA * [ACA-4653] Consistency in naming * [ACA-4653] Use GH action to configure GH author * [ACA-4653] Dedicated sh for publish Docker image job * [ACA-4653] Add missing variables * [ACA-4653] Delete Travis.yml * [ACA-4653] CR fixes * [ACA-4653] Add branch name as action input * [ACA-4653] Proper env var usage in workflow
This commit is contained in:
9
.github/workflows/aca-upstream.yml
vendored
9
.github/workflows/aca-upstream.yml
vendored
@@ -1,6 +1,8 @@
|
||||
name: "ACA upstream"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 12 * * *"
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
@@ -32,8 +34,13 @@ jobs:
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.0
|
||||
with:
|
||||
username: ${{ vars.BOT_GITHUB_USERNAME }}
|
||||
email: ${{ vars.BOT_GITHUB_EMAIL }}
|
||||
global: true
|
||||
- name: Trigger upstream
|
||||
shell: bash
|
||||
run: |
|
||||
npm install github-api
|
||||
./scripts/travis/update/update-project.sh -p $TRAVIS_BUILD_NUMBER -t $GH_TOKEN -v alpha -c $TRAVIS_COMMIT -r ${{ inputs.repo_to_update }}
|
||||
./scripts/travis/update/update-project.sh -p $TRAVIS_BUILD_NUMBER -t $GH_TOKEN -v alpha -c $TRAVIS_COMMIT -r ${{ inputs.repo_to_update || 'alfresco-applications' }}
|
||||
|
148
.github/workflows/release.yml
vendored
Normal file
148
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
name: "Release"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
inputs:
|
||||
dry-run-release:
|
||||
description: 'enable dry-run'
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
pull_request:
|
||||
types: [closed]
|
||||
branches:
|
||||
- develop
|
||||
- master
|
||||
- develop-patch*
|
||||
- master-patch*
|
||||
|
||||
env:
|
||||
APP_CONFIG_ECM_HOST: ${{ secrets.PIPELINE_ENV_URL }}
|
||||
ADMIN_EMAIL: ${{ secrets.PIPELINE_ADMIN_USERNAME }}
|
||||
ADMIN_PASSWORD: ${{ secrets.PIPELINE_ADMIN_PASSWORD }}
|
||||
AWS_REGION: "eu-west-2"
|
||||
CONTENT_CE_DIST_PATH: "./dist/content-ce"
|
||||
APP_CONFIG_PROVIDER: ECM
|
||||
APP_CONFIG_AUTH_TYPE: BASIC
|
||||
APP_CONFIG_OAUTH2_HOST: http://localhost:4200/auth/realms/alfresco
|
||||
PLAYWRIGHT_E2E_HOST: "http://localhost:4200"
|
||||
APP_CONFIG_OAUTH2_CLIENTID: alfresco
|
||||
APP_CONFIG_PLUGIN_AOS: true
|
||||
APP_CONFIG_PLUGIN_CONTENT_SERVICE: true
|
||||
APP_CONFIG_PLUGIN_FOLDER_RULES: true
|
||||
APP_CONFIG_ENABLE_MOBILE_APP_SWITCH: true
|
||||
APP_CONFIG_SESSION_TIME_FOR_OPEN_APP_DIALOG_DISPLAY_IN_HOURS: "12"
|
||||
APP_CONFIG_OAUTH2_IMPLICIT_FLOW: true
|
||||
APP_CONFIG_OAUTH2_SILENT_LOGIN: true
|
||||
APP_CONFIG_OAUTH2_REDIRECT_LOGOUT: /
|
||||
APP_CONFIG_OAUTH2_REDIRECT_LOGIN: /
|
||||
APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI: "{protocol}//{hostname}{:port}/assets/silent-refresh.html"
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
if: github.event.pull_request.merged || ${{ inputs.dry-run-release }}
|
||||
name: "Setup"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
- uses: ./.github/actions/setup
|
||||
publish-docker-registry:
|
||||
needs: [setup]
|
||||
if: github.event.pull_request.merged || ${{ inputs.dry-run-release }}
|
||||
name: "Publish to registry"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
- uses: ./.github/actions/setup
|
||||
- name: publish
|
||||
uses: ./.github/actions/publish-image
|
||||
with:
|
||||
domain: quay.io
|
||||
username: ${{ secrets.QUAY_USERNAME }}
|
||||
password: ${{ secrets.QUAY_PASSWORD }}
|
||||
dry-run: ${{ inputs.dry-run-release }}
|
||||
publish-to-dockerhub:
|
||||
needs: [setup]
|
||||
if: github.event.pull_request.merged || ${{ inputs.dry-run-release }}
|
||||
name: "Publish to Dockerhub"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
- uses: ./.github/actions/setup
|
||||
- name: publish
|
||||
uses: ./.github/actions/publish-image
|
||||
with:
|
||||
domain: docker.io
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
dry-run: ${{ inputs.dry-run-release }}
|
||||
publish-git-tag:
|
||||
needs: [setup]
|
||||
if: (github.event.pull_request.merged && $BRANCH_NAME == "master")|| ${{ inputs.dry-run-release }}
|
||||
name: "Publish git tag"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
- uses: ./.github/actions/setup
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.0
|
||||
with:
|
||||
username: ${{ vars.BOT_GITHUB_USERNAME }}
|
||||
email: ${{ vars.BOT_GITHUB_EMAIL }}
|
||||
global: true
|
||||
- name: publish
|
||||
uses: ./.github/actions/git-tag
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch_name: ${{ env.BRANCH_NAME }}
|
||||
dry-run: ${{ inputs.dry-run-release }}
|
||||
publish-libs:
|
||||
needs: [setup]
|
||||
if: github.event.pull_request.merged || ${{ inputs.dry-run-release }}
|
||||
name: "Publish libs to npm and gh registry"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- uses: ./.github/actions/setup
|
||||
- name: publish
|
||||
uses: ./.github/actions/publish-libs
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
npm-registry-address: ${{ vars.NPM_REGISTRY_ADDRESS }}
|
||||
npm-registry-token: ${{ secrets.NPM_REGISTRY_TOKEN }}
|
||||
dry-run: ${{ inputs.dry-run-release }}
|
Reference in New Issue
Block a user