Skip to content

Commit 629080d

Browse files
Merge pull request #264 from CodeForPhilly/workspace-upgrade
Workspace upgrade
2 parents 1696f6b + d3bbcce commit 629080d

19 files changed

+99
-343
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'Container: Publish Image'
2+
3+
on:
4+
push:
5+
tags: [ 'v*' ]
6+
7+
permissions:
8+
contents: write
9+
packages: write
10+
11+
jobs:
12+
container-publish:
13+
14+
runs-on: ubuntu-latest
15+
steps:
16+
17+
- uses: EmergencePlatform/php-runtime@github-actions/build-site-container/v1
18+
env:
19+
HOLO_SOURCE_MENUNET_NETWORK: https://${{ secrets.BOT_GITHUB_TOKEN }}@github.com/JarvusInnovations/menunet-network.git
20+
HOLO_SOURCE_MENUNET_MENU: https://${{ secrets.BOT_GITHUB_TOKEN }}@github.com/JarvusInnovations/menunet-menu.git
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/preview-deploy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 'Preview: Deploy'
2+
3+
on:
4+
pull_request:
5+
branches: [ develop ]
6+
types: [ opened, reopened, synchronize ]
7+
push:
8+
branches: [ develop ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: write
16+
packages: write
17+
18+
jobs:
19+
preview-deploy:
20+
runs-on: ubuntu-latest
21+
steps:
22+
23+
- uses: EmergencePlatform/php-runtime@github-actions/deploy-site-preview/develop
24+
id: deploy-site-preview
25+
with:
26+
github-token: ${{ secrets.GITHUB_TOKEN }}
27+
kube-config: ${{ secrets.KUBECONFIG_BASE64 }}
28+
kube-namespace: laddr
29+
kube-hostname: laddr.sandbox.k8s.phl.io

.github/workflows/release-deploy.yml

Lines changed: 0 additions & 90 deletions
This file was deleted.

.github/workflows/release-prepare.yml

Lines changed: 6 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -4,111 +4,17 @@ on:
44
push:
55
branches: [ develop ]
66

7-
env:
8-
GITHUB_USERNAME: codeforphilly-bot
9-
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
10-
RELEASE_BRANCH: releases/v3
7+
permissions:
8+
contents: read
9+
pull-requests: write
1110

1211
jobs:
1312
release-prepare:
1413

1514
runs-on: ubuntu-latest
1615
steps:
1716

18-
- uses: actions/checkout@v2
17+
- uses: JarvusInnovations/infra-components@channels/github-actions/release-prepare/latest
1918
with:
20-
fetch-depth: 0
21-
22-
# - uses: mxschmitt/action-tmate@v3
23-
24-
- name: Create/update pull request
25-
run: |
26-
# get latest release tag
27-
latest_release=$(git describe --tags --abbrev=0 "origin/${RELEASE_BRANCH}")
28-
latest_release_bumped=$(echo $latest_release | awk -F. -v OFS=. '{$NF++;print}')
29-
30-
31-
# create or update PR
32-
pr_body="$(cat <<EOF
33-
Release: ${latest_release_bumped}
34-
35-
## Improvements
36-
37-
## Technical
38-
39-
EOF
40-
)"
41-
42-
pr_number=$(hub pr list -h develop -f '%I')
43-
44-
if [ -n "${pr_number}" ]; then
45-
echo "Updating PR #${pr_number}"
46-
existing_comment_id=$(hub api "/repos/${GITHUB_REPOSITORY}/issues/${pr_number}/comments" | jq ".[] | select(.user.login==\"${GITHUB_USERNAME}\") | .id")
47-
else
48-
echo "Opening PR"
49-
hub pull-request -b "${RELEASE_BRANCH}" -h develop -F <(echo "${pr_body}") > /tmp/pr.json
50-
pr_number=$(hub pr list -h develop -f '%I')
51-
echo "Opened PR #${pr_number}"
52-
fi
53-
54-
55-
# build changelog
56-
commits=$(
57-
git log \
58-
--first-parent \
59-
--reverse \
60-
--format="%H" \
61-
"origin/${RELEASE_BRANCH}..develop"
62-
)
63-
64-
changelog=()
65-
66-
while read -r commit; do
67-
subject="$(git show -s --format=%s "${commit}")"
68-
line=""
69-
70-
if [[ "${subject}" =~ Merge\ pull\ request\ \#([0-9]+) ]]; then
71-
line="$(hub pr show -f '%t [%i] @%au' "${BASH_REMATCH[1]}" || true)"
72-
fi
73-
74-
if [ -z "${line}" ]; then
75-
author="$(hub api "/repos/${GITHUB_REPOSITORY}/commits/${commit}" -H Accept:application/vnd.github.v3+json | jq -r '.author.login')"
76-
if [ -n "${author}" ]; then
77-
author="@${author}"
78-
else
79-
author="$(git show -s --format=%ae "${commit}")"
80-
fi
81-
82-
line="${subject} ${author}"
83-
fi
84-
85-
# move ticket number prefix into to existing square brackets at end
86-
line="$(echo "${line}" | perl -pe 's/^([A-Z]+-[0-9]+):?\s*(.*?)\s*\[([^]]+)\]\s*(\S+)$/\2 [\3, \1] \4/')"
87-
88-
# move ticket number prefix into to new square brackets at end
89-
line="$(echo "${line}" | perl -pe 's/^([A-Z]+-[0-9]+):?\s*(.*?)\s*(\S+)$/\2 [\1] \3/')"
90-
91-
# combine doubled square brackets at the end
92-
line="$(echo "${line}" | perl -pe 's/^\s*(.*?)\s*\[([A-Z]+-[0-9]+)\]\s*\[([^]]+)\]\s*(\S+)$/\1 [\3, \2] \4/')"
93-
94-
changelog+=("- ${line}")
95-
done <<< "${commits}"
96-
97-
98-
# create or update comment
99-
comment_body="$(cat <<EOF
100-
## Changelog
101-
102-
\`\`\`markdown
103-
$(IFS=$'\n'; echo "${changelog[*]}")
104-
\`\`\`
105-
EOF
106-
)"
107-
108-
if [ -n "${existing_comment_id}" ]; then
109-
echo "Updating comment #${existing_comment_id}"
110-
hub api "/repos/${GITHUB_REPOSITORY}/issues/comments/${existing_comment_id}" -f body="${comment_body}"
111-
else
112-
echo "Creating comment"
113-
hub api "/repos/${GITHUB_REPOSITORY}/issues/${pr_number}/comments" -f body="${comment_body}"
114-
fi
19+
github-token: ${{ secrets.GITHUB_TOKEN }}
20+
release-branch: releases/v3

.github/workflows/release-publish.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Release: Publish PR'
2+
3+
on:
4+
pull_request:
5+
branches: [ releases/v3 ]
6+
types: [ closed ]
7+
8+
jobs:
9+
release-publish:
10+
11+
runs-on: ubuntu-latest
12+
steps:
13+
14+
- uses: JarvusInnovations/infra-components@channels/github-actions/release-publish/latest
15+
with:
16+
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}

.github/workflows/release-validate.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,12 @@ on:
55
branches: [ 'releases/v*' ]
66
types: [ opened, edited, reopened, synchronize ]
77

8-
env:
9-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10-
118
jobs:
129
release-validate:
1310

1411
runs-on: ubuntu-latest
1512
steps:
1613

17-
- name: Validate PR title
18-
run: |
19-
PR_TITLE=$(jq -r ".pull_request.title" $GITHUB_EVENT_PATH)
20-
21-
# check title format and extract tag
22-
if [[ "${PR_TITLE}" =~ ^Release:\ v[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$ ]]; then
23-
RELEASE_TAG="${PR_TITLE:9}"
24-
echo "RELEASE_TAG=${RELEASE_TAG}" >> $GITHUB_ENV
25-
else
26-
echo 'PR title must match format "Release: vX.Y.Z(-rc.#)?"'
27-
exit 1
28-
fi
29-
30-
# check that tag doesn't exist
31-
if git ls-remote --exit-code "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}" "refs/tags/${RELEASE_TAG}"; then
32-
echo "The PR title's version exists already"
33-
exit 1
34-
fi
14+
- uses: JarvusInnovations/infra-components@channels/github-actions/release-validate/latest
15+
with:
16+
github-token: ${{ secrets.GITHUB_TOKEN }}

.holo/branches/docs-site/_laddr.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[holomapping]
2+
root = "docs"
23
files = [
3-
"docs/**",
44
"mkdocs.*.yml"
55
]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[holomapping]
2+
root = "docs"
3+
files = [
4+
"**",
5+
"!mkdocs.*.yml",
6+
]

.holo/sources/skeleton-v2.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[holosource]
22
url = "https://github.com/JarvusInnovations/emergence-skeleton-v2"
3-
ref = "refs/tags/v2.11.2"
3+
ref = "refs/tags/v2.12.4"

.studiorc

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)