Skip to content

Commit

Permalink
chore: fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuznyetsov committed Oct 11, 2024
1 parent d810024 commit 03418b5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
echo "[ERROR] Cannot proceed with release - tag already exists"
fi
fi
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Set up yq
run: |
python -m pip install --upgrade pip
Expand All @@ -56,16 +60,16 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- name: Create Release
env:
GH_TOKEN: ${{ secrets.CHE_BOT_GITHUB_TOKEN }}
run: |
git config --global user.name "Mykhailo Kuznietsov"
git config --global user.email "mkuznets@redhat.com"
export GITHUB_TOKEN=${{ secrets.CHE_BOT_GITHUB_TOKEN }}
/bin/bash make-release.sh --version ${{ github.event.inputs.version }} --trigger-release
- name: Publish release image
run: |
git checkout ${{ github.event.inputs.version }}
SHORT_SHA1=$(git rev-parse --short=7 HEAD)
docker buildx build --platform linux/amd64 -f Containerfile --push -t quay.io/eclipse/che-docs:${SHORT_SHA1} -t quay.io/eclipse/che-docs:${{ github.event.inputs.version }} .
# - name: Create Release
# env:
# GH_TOKEN: ${{ secrets.CHE_BOT_GITHUB_TOKEN }}
# run: |
# git config --global user.name "Mykhailo Kuznietsov"
# git config --global user.email "mkuznets@redhat.com"
# export GITHUB_TOKEN=${{ secrets.CHE_BOT_GITHUB_TOKEN }}
# /bin/bash make-release.sh --version ${{ github.event.inputs.version }} --trigger-release
# - name: Publish release image
# run: |
# git checkout ${{ github.event.inputs.version }}
# SHORT_SHA1=$(git rev-parse --short=7 HEAD)
# docker buildx build --platform linux/amd64 -f Containerfile --push -t quay.io/eclipse/che-docs:${SHORT_SHA1} -t quay.io/eclipse/che-docs:${{ github.event.inputs.version }} .
2 changes: 1 addition & 1 deletion make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ updateYaml() {
return 1
else
if [[ $(git rev-parse --abbrev-ref HEAD) == *"${BRANCH}"* ]]; then
replaceFieldSed $playbookfile 'version' "${BRANCH}"
replaceFieldSed $playbookfile '^version' "${BRANCH}"
replaceFieldSed $playbookfile 'prerelease' "false"
fi
# special fields for updating PR for 7.x.y branch
Expand Down

0 comments on commit 03418b5

Please sign in to comment.