Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Rogerson committed Sep 27, 2023
1 parent 2ca84dc commit 02882f3
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,65 @@ jobs:
echo "Current version: ${{ steps.get_semver.outputs.current_version }}"
echo "Next version: ${{ steps.get_semver.outputs.next_version }}"
release-to-staging:
if: github.event_name == 'pull_request' && github.head_ref == 'main'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Extract PR title
id: extract_title
run: |
TITLE="${{ github.event.pull_request.title }}"
echo "::set-output name=pr_title::$TITLE"
- name: Determine Version Increment
id: version_increment
run: |
TITLE="${{ steps.extract_title.outputs.pr_title }}"
if [[ $TITLE == Patch* ]]; then
echo "::set-output name=increment::patch"
elif [[ $TITLE == Minor* ]]; then
echo "::set-output name=increment::minor"
elif [[ $TITLE == Major* ]]; then
echo "::set-output name=increment::major"
else
echo "Invalid PR title. Exiting."
exit 1
fi
- uses: rickstaa/action-get-semver@v1
id: get_semver
with:
bump_level: "${{ steps.version_increment.outputs.increment }}"

- name: Print current and next version
run: |
echo "Current version: ${{ steps.get_semver.outputs.current_version }}"
echo "Next version: ${{ steps.get_semver.outputs.next_version }}"
# - name: setup-docker
# uses: docker-practice/actions-setup-docker@master
# - name: Download build artifact
# uses: actions/download-artifact@v3
# with:
# name: build
# path: ./dist
# - name: Generate version
# run: ./create-version-file.sh
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_HUB_STAGING_LOGIN }}
# password: ${{ secrets.DOCKER_HUB_STAGING_PASSWORD }}
# - name: Build and push image
# run: docker buildx build --platform linux/amd64,linux/arm64 -t orbsnetworkstaging/ethereum-writer:$(cat .version) --push .


# release-to-staging:
# if: github.event_name == 'pull_request' && github.head_ref == 'main'
# needs: build-and-test
Expand Down

0 comments on commit 02882f3

Please sign in to comment.