Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Test release #6

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 4 additions & 39 deletions .github/workflows/skyetel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ jobs:
name: Build
runs-on: ubuntu-latest

outputs:
matrix: ${{ steps.set-deployment-matrix.outputs.matrix }}
matrixLength: ${{ steps.set-deployment-matrix.outputs.matrixLength }}

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
Expand All @@ -31,29 +27,6 @@ jobs:
- name: Run the tests
run: bundle exec rake

- name: Set Deployment Matrix
id: set-deployment-matrix
run: |
branchName=$(echo '${{ github.ref }}' | sed 's,refs/heads/,,g')
matrixSource=$(cat << EOF
[
{
"environment": "staging",
"branch": "develop",
"release": false
},
{
"environment": "production",
"branch": "main",
"release": true
}
]
EOF
)
matrix=$(echo $matrixSource | jq --arg branchName "$branchName" 'map(. | select((.branch==$branchName)) )')
echo "matrix={\"include\":$(echo $matrix)}" >> $GITHUB_OUTPUT
echo "matrixLength=$(echo $matrix | jq length)" >> $GITHUB_OUTPUT

release:
name: Release
runs-on: ubuntu-latest
Expand All @@ -77,9 +50,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- build
strategy:
matrix: ${{ fromJSON(needs.build.outputs.matrix) }}
if: needs.build.outputs.matrixLength > 0
if: ${{ github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -99,7 +70,7 @@ jobs:
ghcr.io/somleng/somleng-skyetel
tags: |
type=ref,event=tag
type=raw,value=beta
type=raw,value=beta,enable=${{ !startsWith(github.ref, 'refs/tags/v') }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -116,13 +87,7 @@ jobs:
create-sentry-release:
name: Create Sentry Release
runs-on: ubuntu-latest
needs:
- build
- build-packages
if: ${{ startsWith(github.ref_name, 'v') }}
strategy:
matrix: ${{fromJSON(needs.build.outputs.matrix)}}

if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- uses: actions/checkout@v4

Expand All @@ -133,5 +98,5 @@ jobs:
SENTRY_ORG: somleng
SENTRY_PROJECT: somleng-skyetel
with:
environment: ${{ matrix.environment }}
environment: production
version: ${{ github.ref_name }}
3 changes: 0 additions & 3 deletions skyetel/version.rb

This file was deleted.