Skip to content

Commit 91f4c45

Browse files
authored
Merge pull request #1147 from github/3.8-main
Sync 3.8-main to 3.8-stable
2 parents 9560a5f + 0b66b23 commit 91f4c45

File tree

4 files changed

+47
-49
lines changed

4 files changed

+47
-49
lines changed

.github/workflows/build-and-release.yml

Lines changed: 36 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ name: Build and Release
44
on:
55
workflow_dispatch:
66
inputs:
7-
gh-token:
8-
description: 'GitHub Token - used to create a commit in the backup-utils repo'
9-
required: true
10-
type: string
117
version:
128
description: 'Version - patch version of the release (e.g. x.y.z)'
139
required: true
@@ -21,22 +17,20 @@ on:
2117
jobs:
2218
build:
2319
runs-on: ubuntu-latest
20+
outputs:
21+
rc-app-token: ${{ steps.app-token.outputs.token }}
2422
steps:
25-
# resulting token still gets denied by the backup-utils repo
26-
# see: https://github.com/actions/create-github-app-token/pull/46
27-
# - uses: timreimherr/create-github-app-token@main
28-
# id: app-token
29-
# with:
30-
# # required
31-
# app_id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
32-
# private_key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
33-
# owner: ${{ github.repository_owner }}
34-
# repositories: backup-utils,backup-utils-private
23+
- uses: actions/create-github-app-token@v1
24+
id: app-token
25+
with:
26+
app-id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
27+
private-key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
28+
owner: ${{ github.repository_owner }}
29+
repositories: "backup-utils-private"
3530
- name: Checkout backup-utils-private
3631
uses: actions/checkout@v4
3732
with:
38-
token: ${{ github.event.inputs.gh-token }}
39-
repository: github/backup-utils-private
33+
token: ${{ steps.app-token.outputs.token }}
4034
- name: Install dependencies
4135
run: |
4236
sudo apt-get update -y
@@ -50,14 +44,6 @@ jobs:
5044
- name: Package deb
5145
run: |
5246
./script/package-deb
53-
# many need to remove this once release-notes compilation is automated
54-
- name: Rename deb artifact
55-
run: |
56-
for file in dist/github-backup-utils_*_all.deb; do
57-
if [[ -f "$file" ]]; then
58-
mv "$file" "dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb"
59-
fi
60-
done
6147
- name: Upload deb artifact
6248
uses: actions/upload-artifact@v3
6349
with:
@@ -79,35 +65,40 @@ jobs:
7965
outputs:
8066
commit_hash: ${{ steps.empty-commit.outputs.commit_hash }}
8167
steps:
82-
# resulting token still gets denied by the backup-utils repo
83-
# see: https://github.com/actions/create-github-app-token/pull/46
84-
# - uses: timreimherr/create-github-app-token@main
85-
# id: app-token
86-
# with:
87-
# app_id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
88-
# private_key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
89-
# owner: ${{ github.repository_owner }}
90-
# repositories: backup-utils,backup-utils-private
68+
- uses: actions/create-github-app-token@v1
69+
id: app-token
70+
with:
71+
app-id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
72+
private-key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
73+
owner: ${{ github.repository_owner }}
74+
repositories: "backup-utils,backup-utils-private"
75+
- name: Get major-feature from version
76+
id: get-major-feature
77+
run: |
78+
echo "MAJOR_FEATURE=$(echo ${{ github.event.inputs.version }} | cut -d '.' -f 1,2)" >> "$GITHUB_ENV"
79+
- name: Verify major-feature
80+
run: |
81+
echo "major_feature: $MAJOR_FEATURE"
9182
- name: Checkout backup-utils
9283
uses: actions/checkout@v4
9384
with:
94-
token: ${{ github.event.inputs.gh-token }}
85+
token: ${{ steps.app-token.outputs.token }}
9586
repository: github/backup-utils
96-
ref: master
9787
- name: Create empty commit
9888
uses: stefanzweifel/git-auto-commit-action@v4
9989
id: empty-commit
10090
with:
101-
branch: master
91+
branch: ${{ env.MAJOR_FEATURE }}-stable
10292
commit_message: "${{ github.event.inputs.version }} release"
103-
commit_user_name: "${{ github.actor }}"
104-
commit_user_email: "ghes-releases-team@github.com"
93+
commit_user_name: "release-controller[bot]"
94+
commit_user_email: "223695+release-controller[bot]@users.noreply.github.com"
10595
commit_options: "--allow-empty"
96+
push_options: "--force"
10697
skip_dirty_check: true
107-
- name: Checkout backup-utils
98+
- name: Checkout backup-utils-private for release notes
10899
uses: actions/checkout@v4
109100
with:
110-
token: ${{ github.event.inputs.gh-token }}
101+
token: ${{ steps.app-token.outputs.token }}
111102
repository: github/backup-utils-private
112103
- name: Download deb artifact
113104
uses: actions/download-artifact@v3
@@ -120,20 +111,17 @@ jobs:
120111
- name: Create Release
121112
uses: ncipollo/release-action@v1
122113
with:
123-
token: ${{ github.event.inputs.gh-token }}
114+
token: ${{ steps.app-token.outputs.token }}
115+
owner: github
124116
repo: backup-utils
125117
name: |
126118
GitHub Enterprise Server Backup Utilities v${{ github.event.inputs.version }}
127119
artifacts: |
128-
github-backup-utils-v${{ github.event.inputs.version }}.tar.gz, \
120+
github-backup-utils-v${{ github.event.inputs.version }}.tar.gz,
129121
github-backup-utils_${{ github.event.inputs.version }}_all.deb
130122
tag: v${{ github.event.inputs.version }}
131-
commit: ${{ steps.empty-commit.outputs.commit_hash }}
123+
commit: ${{ env.MAJOR_FEATURE }}-stable
132124
bodyFile: release-notes/${{ github.event.inputs.version }}.md
133125
draft: ${{ github.event.inputs.draft }}
134126
allowUpdates: true
135-
artifactContentType: "raw"
136-
137-
138-
139-
127+
artifactContentType: "raw"

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# Full git history is needed to get a proper list of changed files within `super-linter`
1919
fetch-depth: 0
2020
- name: Lint Code Base
21-
uses: github/super-linter@v4
21+
uses: github/super-linter@v5
2222
env:
2323
VALIDATE_ALL_CODEBASE: false
2424
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
github-backup-utils (3.8.4) UNRELEASED; urgency=medium
2+
3+
* On an instance with Actions enabled, incorrect backup and restore settings prevented the storage container name from being restored. This made the logs from that container inaccessible, and caused Actions to create a new storage container in a different location. {% comment %} https://github.com/github/backup-utils-private/pull/651, https://github.com/github/backup-utils-private/pull/459 {% endcomment %}
4+
5+
-- ghes-releases-team Fri, 20 Oct 2023 18:49:24 +0000
6+
17
github-backup-utils (3.8.3) UNRELEASED; urgency=medium
28

39
* Fix two issues with binary backup (slow gzip compression and support for restore from instances other than SQL master) #551

release-notes/3.8.4.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Bug Fixes
2+
3+
* On an instance with Actions enabled, incorrect backup and restore settings prevented the storage container name from being restored. This made the logs from that container inaccessible, and caused Actions to create a new storage container in a different location. {% comment %} https://github.com/github/backup-utils-private/pull/651, https://github.com/github/backup-utils-private/pull/459 {% endcomment %}
4+

0 commit comments

Comments
 (0)