-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Omar Rida
authored and
Omar Rida
committed
Mar 20, 2024
1 parent
223c552
commit 954d44b
Showing
3 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
on: | ||
push: | ||
branches: | ||
- omarrida/openapi-test | ||
jobs: | ||
openapi: | ||
runs-on: ubuntu-latest | ||
needs: versions-changed | ||
if: ${{ needs.versions-changed.outputs.openapi == 'true' || inputs.generator == 'openapi' }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
|
||
- name: Install | ||
run: yarn install | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: fernapi | ||
password: ${{ secrets.FERN_API_DOCKERHUB_PASSWORD }} | ||
|
||
- name: Build CLI | ||
working-directory: ./generators/openapi | ||
run: yarn dist:cli | ||
|
||
- name: Print Version | ||
if: ${{ inputs.generator != 'openapi' }} | ||
run: | | ||
projectVersion=$(cat generators/openapi/VERSION) | ||
echo $projectVersion | ||
echo "VERSION=$projectVersion" >> $GITHUB_ENV | ||
- name: Print Version Dev | ||
if: ${{ inputs.generator == 'openapi' }} | ||
run: | | ||
projectVersion=$(cat generators/openapi/VERSION) | ||
commitNumber=$(git log --oneline | wc -l ) | ||
sha_short=$(git rev-parse --short HEAD) | ||
echo $projectVersion-$commitNumber-$sha_short | ||
echo "VERSION=$projectVersion-$commitNumber-$sha_short" >> $GITHUB_ENV | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./generators/openapi | ||
file: ./generators/openapi/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=min | ||
push: true | ||
tags: fernapi/omarrida-openapi:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"organization": "fern", | ||
"version": "0.19.10" | ||
"version": "0.19.14-rc0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters