Skip to content

Commit

Permalink
Disabled updated of main branch on new beta release
Browse files Browse the repository at this point in the history
  • Loading branch information
tpanajott committed Mar 10, 2024
1 parent 5b119be commit a0c06c1
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,40 @@ on:
- 'beta'

jobs:
update-main-beta-branch:
if: ${{ !github.event.act }} # skip during local actions testing
name: prepare
permissions:
contents: write
actions: read
runs-on: ubuntu-latest
steps:
- name: Get branch name
shell: bash
id: image_name
run: |
if [ "${{ github.event.release.prerelease }}" != "true" ]; then
echo "branch=main" >> $GITHUB_OUTPUT
elif [ "${{ github.event.release.prerelease }}" == "true" ]; then
echo "branch=beta" >> $GITHUB_OUTPUT
else
echo "Cannot determine image name!"
exit 1
fi
- name: Checkout the repository
uses: actions/checkout@v4
if: ${{ steps.image_name.outputs.branch == "beta" }}
with:
ref: main
- name: Update beta version in main branch
if: ${{ steps.image_name.outputs.branch == "beta" }}
run: |
sed -i "s/^version: [0-9A-Za-z\.\-]\+/version: ${{ github.ref_name }}/g" docker-beta/config.yaml
- uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ steps.image_name.outputs.branch == "beta" }}
with:
commit_message: Update beta version reference
branch: "main"
# update-main-beta-branch:
# if: ${{ !github.event.act }} # skip during local actions testing
# name: prepare
# permissions:
# contents: write
# actions: read
# runs-on: ubuntu-latest
# steps:
# - name: Get branch name
# shell: bash
# id: image_name
# run: |
# if [ "${{ github.event.release.prerelease }}" != "true" ]; then
# echo "branch=main" >> $GITHUB_OUTPUT
# elif [ "${{ github.event.release.prerelease }}" == "true" ]; then
# echo "branch=beta" >> $GITHUB_OUTPUT
# else
# echo "Cannot determine image name!"
# exit 1
# fi
# - name: Checkout the repository
# uses: actions/checkout@v4
# if: ${{ steps.image_name.outputs.branch == "beta" }}
# with:
# ref: main
# - name: Update beta version in main branch
# if: ${{ steps.image_name.outputs.branch == "beta" }}
# run: |
# sed -i "s/^version: [0-9A-Za-z\.\-]\+/version: ${{ github.ref_name }}/g" docker-beta/config.yaml
# - uses: stefanzweifel/git-auto-commit-action@v5
# if: ${{ steps.image_name.outputs.branch == "beta" }}
# with:
# commit_message: Update beta version reference
# branch: "main"

prepare:
if: ${{ !github.event.act }} # skip during local actions testing
Expand Down

0 comments on commit a0c06c1

Please sign in to comment.