|
|
|
@ -8,33 +8,90 @@ on: |
|
|
|
jobs: |
|
|
|
jobs: |
|
|
|
setup: |
|
|
|
setup: |
|
|
|
name: Setup |
|
|
|
name: Setup |
|
|
|
|
|
|
|
if: github.ref_name == 'master' || github.ref_name == 'rc' || github.ref_name == 'hotfix' |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
outputs: |
|
|
|
outputs: |
|
|
|
core_version: ${{ steps.get-core.outputs.version }} |
|
|
|
core_version: ${{ steps.get-core.outputs.version }} |
|
|
|
|
|
|
|
core_version_update: ${{ steps.core-update.outputs.update }} |
|
|
|
web_version: ${{ steps.get-web.outputs.version }} |
|
|
|
web_version: ${{ steps.get-web.outputs.version }} |
|
|
|
|
|
|
|
web_version_update: ${{ steps.web-update.outputs.update }} |
|
|
|
key_connector_version: ${{ steps.get-key-connector.outputs.version }} |
|
|
|
key_connector_version: ${{ steps.get-key-connector.outputs.version }} |
|
|
|
|
|
|
|
key_connector_version_update: ${{ steps.key-connector-update.outputs.update }} |
|
|
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
steps: |
|
|
|
|
|
|
|
- name: Checkout Branch |
|
|
|
|
|
|
|
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 |
|
|
|
|
|
|
|
|
|
|
|
- name: Get Latest Core Version |
|
|
|
- name: Get Latest Core Version |
|
|
|
id: get-core |
|
|
|
id: get-core |
|
|
|
uses: bitwarden/gh-actions/get-release-version@f0108b4b74486a99918c7c3f7096a584eb8ccf2c |
|
|
|
uses: bitwarden/gh-actions/get-release-version@664c8899c95490c65dac0df11519d24ed8419c85 |
|
|
|
with: |
|
|
|
with: |
|
|
|
repository: bitwarden/server |
|
|
|
repository: bitwarden/server |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check if Core Version needs updating |
|
|
|
|
|
|
|
id: core-update |
|
|
|
|
|
|
|
env: |
|
|
|
|
|
|
|
LATEST_CORE_VERSION: ${{ steps.get-core.outputs.version }} |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
CORE_VERSION=$(sed -r -n "s/COREVERSION=\"([0-9]+\.[0-9]+\.[0-9]+)\"/\1/p" bitwarden.sh) |
|
|
|
|
|
|
|
echo "Core Version: $CORE_VERSION" |
|
|
|
|
|
|
|
echo "Latest Core Version: $LATEST_CORE_VERSION" |
|
|
|
|
|
|
|
if [ "$CORE_VERSION" != "$LATEST_CORE_VERSION" ]; then |
|
|
|
|
|
|
|
echo "Needs Core update!" |
|
|
|
|
|
|
|
echo "::set-output name=update::1" |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
echo "::set-output name=update::0" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
- name: Get Latest Web Version |
|
|
|
- name: Get Latest Web Version |
|
|
|
id: get-web |
|
|
|
id: get-web |
|
|
|
uses: bitwarden/gh-actions/get-release-version@f0108b4b74486a99918c7c3f7096a584eb8ccf2c |
|
|
|
uses: bitwarden/gh-actions/get-release-version@664c8899c95490c65dac0df11519d24ed8419c85 |
|
|
|
with: |
|
|
|
with: |
|
|
|
repository: bitwarden/web |
|
|
|
repository: bitwarden/web |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check if Web Version needs updating |
|
|
|
|
|
|
|
id: web-update |
|
|
|
|
|
|
|
env: |
|
|
|
|
|
|
|
LATEST_WEB_VERSION: ${{ steps.get-web.outputs.version }} |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
WEB_VERSION=$(sed -r -n "s/WEBVERSION=\"([0-9]+\.[0-9]+\.[0-9]+)\"/\1/p" bitwarden.sh) |
|
|
|
|
|
|
|
echo "Web Version: $WEB_VERSION" |
|
|
|
|
|
|
|
echo "Latest Web Version: $LATEST_WEB_VERSION" |
|
|
|
|
|
|
|
if [ "$WEB_VERSION" != "$LATEST_WEB_VERSION" ]; then |
|
|
|
|
|
|
|
echo "Needs Web update!" |
|
|
|
|
|
|
|
echo "::set-output name=update::1" |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
echo "::set-output name=update::0" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
- name: Get Latest Key Connector Version |
|
|
|
- name: Get Latest Key Connector Version |
|
|
|
id: get-key-connector |
|
|
|
id: get-key-connector |
|
|
|
uses: bitwarden/gh-actions/get-release-version@f0108b4b74486a99918c7c3f7096a584eb8ccf2c |
|
|
|
uses: bitwarden/gh-actions/get-release-version@664c8899c95490c65dac0df11519d24ed8419c85 |
|
|
|
with: |
|
|
|
with: |
|
|
|
repository: bitwarden/key-connector |
|
|
|
repository: bitwarden/key-connector |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check if Key Connector Version needs updating |
|
|
|
|
|
|
|
id: key-connector-update |
|
|
|
|
|
|
|
env: |
|
|
|
|
|
|
|
LATEST_KEY_CONNECTOR_VERSION: ${{ steps.get-key-connector.outputs.version }} |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
KEY_CONNECTOR_VERSION=$(sed -r -n "s/KEYCONNECTORVERSION=\"([0-9]+\.[0-9]+\.[0-9]+)\"/\1/p" bitwarden.sh) |
|
|
|
|
|
|
|
echo "Key Connector Version: $KEY_CONNECTOR_VERSION" |
|
|
|
|
|
|
|
echo "Latest Key Connector Version: $LATEST_KEY_CONNECTOR_VERSION" |
|
|
|
|
|
|
|
if [ "$KEY_CONNECTOR_VERSION" != "$LATEST_KEY_CONNECTOR_VERSION" ]; then |
|
|
|
|
|
|
|
echo "Needs Key Connector update!" |
|
|
|
|
|
|
|
echo "::set-output name=update::1" |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
echo "::set-output name=update::0" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
update-versions: |
|
|
|
update-versions: |
|
|
|
name: "Create update_versions branch" |
|
|
|
name: "Create update_versions branch" |
|
|
|
|
|
|
|
if: | |
|
|
|
|
|
|
|
needs.setup.outputs.core_version_update == 1 || |
|
|
|
|
|
|
|
needs.setup.outputs.web_version_update == 1 || |
|
|
|
|
|
|
|
needs.setup.outputs.key_connector_version_update == 1 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
needs: setup |
|
|
|
needs: setup |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
@ -84,12 +141,12 @@ jobs: |
|
|
|
- name: Create Update Versions PR |
|
|
|
- name: Create Update Versions PR |
|
|
|
env: |
|
|
|
env: |
|
|
|
PR_BRANCH: "update-versions" |
|
|
|
PR_BRANCH: "update-versions" |
|
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
|
|
BASE_BRANCH: master |
|
|
|
BASE_BRANCH: ${{ github.ref_name }} |
|
|
|
TITLE: "Update core, web, and key-connector versions" |
|
|
|
TITLE: "Update core, web, and key-connector versions" |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
gh pr create --title "$TITLE" \ |
|
|
|
gh pr create --title "$TITLE" \ |
|
|
|
--base "$BASE" \ |
|
|
|
--base "$BASE_BRANCH" \ |
|
|
|
--head "$PR_BRANCH" \ |
|
|
|
--head "$PR_BRANCH" \ |
|
|
|
--label "automated pr" \ |
|
|
|
--label "automated pr" \ |
|
|
|
--body " |
|
|
|
--body " |
|
|
|
@ -101,4 +158,4 @@ jobs: |
|
|
|
- [X] Other |
|
|
|
- [X] Other |
|
|
|
|
|
|
|
|
|
|
|
## Objective |
|
|
|
## Objective |
|
|
|
Automated version updates to core, web, and key-connector versions in `bitwarden.sh` and `bitwarden.ps1`." |
|
|
|
Automated version updates to core, web, and key-connector versions in bitwarden.sh and bitwarden.ps1." |
|
|
|
|