Skip to content

chore(deps): Bump softprops/action-gh-release from 2.1.0 to 2.2.0 (#6… #2103

chore(deps): Bump softprops/action-gh-release from 2.1.0 to 2.2.0 (#6…

chore(deps): Bump softprops/action-gh-release from 2.1.0 to 2.2.0 (#6… #2103

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Deploy
on:
push:
branches:
- "develop"
permissions:
contents: read
jobs:
deploy:
name: "Deploy"
runs-on: ubuntu-latest
if: github.ref_type == 'branch'
env:
SOURCE_REPO_PATH: main
TARGET_REPO_PATH: built
EXT_REPO_PATH: ext
permissions:
contents: write
steps:
- name: Check out the source code
uses: actions/checkout@v4.2.2
with:
submodules: recursive
path: ${{ env.SOURCE_REPO_PATH }}
- name: Check out Automattic/vip-go-mu-plugins-ext
uses: actions/checkout@v4.2.2
with:
repository: Automattic/vip-go-mu-plugins-ext
path: ${{ env.EXT_REPO_PATH }}
- name: Check out Automattic/vip-go-mu-plugins-built
uses: actions/checkout@v4.2.2
with:
repository: Automattic/vip-go-mu-plugins-built
path: ${{ env.TARGET_REPO_PATH }}
ssh-key: ${{ secrets.SSH_DEPLOY_KEY }}
- name: Configure .git
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "no-reply@automattic.com"
git config push.default "current"
working-directory: ${{ env.TARGET_REPO_PATH }}
- name: Synchronize files
run: |
mv "${GITHUB_WORKSPACE}/${TARGET_REPO_PATH}/.git" "${GITHUB_WORKSPACE}/${TARGET_REPO_PATH}/../built-git-bak"
rsync --delete --delete-excluded -a "${GITHUB_WORKSPACE}/${SOURCE_REPO_PATH}/" "${GITHUB_WORKSPACE}/${EXT_REPO_PATH}/"* "${GITHUB_WORKSPACE}/${TARGET_REPO_PATH}/" --exclude-from="${GITHUB_WORKSPACE}/${SOURCE_REPO_PATH}/.dockerignore" --exclude-from="${GITHUB_WORKSPACE}/${EXT_REPO_PATH}/.dockerignore" --exclude="/jetpack-*/"
mv "${GITHUB_WORKSPACE}/${TARGET_REPO_PATH}/../built-git-bak" "${GITHUB_WORKSPACE}/${TARGET_REPO_PATH}/.git"
- name: Clean up
run: |
TARGET="${GITHUB_WORKSPACE}/${TARGET_REPO_PATH}"
find "${TARGET}" -name ".svn" -exec rm -rfv {} \; 2> /dev/null
find "${TARGET}" -name ".git*" -not -name ".github" -not -name ".git" -exec rm -rfv {} \; 2> /dev/null
cp -vf "${GITHUB_WORKSPACE}/${SOURCE_REPO_PATH}/README-PUBLIC.md" "${TARGET}/README.md"
cp -vf "${GITHUB_WORKSPACE}/${SOURCE_REPO_PATH}/composer.json.tpl" "${TARGET}/composer.json"
- name: Commit!
run: |
git add -A .
git status
if [ -n "$(git diff --stat --cached)" ]; then
git commit -am "Built from vip-go-mu-plugins@${GITHUB_SHA}"
git push
fi
working-directory: ${{ env.TARGET_REPO_PATH }}