diff --git a/.all-contributorsrc b/.all-contributorsrc deleted file mode 100644 index a29a766..0000000 --- a/.all-contributorsrc +++ /dev/null @@ -1,26 +0,0 @@ -{ - "projectName": "github-management-scripts", - "projectOwner": "TomerFi", - "repoType": "github", - "repoHost": "https://github.com", - "files": [ - "README.md" - ], - "imageSize": 100, - "contributorsPerLine": 7, - "contributorsSortAlphabetically": true, - "skipCi": true, - "contributors": [ - { - "login": "altmas5", - "name": "Jorge Vallecillo", - "avatar_url": "https://avatars.githubusercontent.com/u/1054618?v=4", - "profile": "http://altmascinco.wordpress.com", - "contributions": [ - "infra" - ] - } - ], - "commitConvention": "none", - "commitType": "docs" -} diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index fcda3de..0000000 --- a/.github/stale.yml +++ /dev/null @@ -1,16 +0,0 @@ -# https://github.com/marketplace/stale ---- -daysUntilStale: 30 -daysUntilClose: 3 -exemptLabels: - - "status: confirmed" - - "status: on-hold" - - "type: todo" - - "type: wip" - - "type: enhancement" -staleLabel: "status: stale" -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -closeComment: "Closing this issue." diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f6524c5..09c2c12 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,89 +1,89 @@ ---- -name: Deploy - -on: - workflow_dispatch: - -jobs: - deploy: - runs-on: ubuntu-latest - environment: deployment - name: Build and deploy - steps: - - name: Checkout sources - uses: actions/checkout@v3 - with: - ssh-key: ${{ secrets.DEPLOY_KEY }} - - - name: Install node 16 - uses: actions/setup-node@v3 - with: - node-version: '16' - cache: npm - - - name: Configure git - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - - - name: Configure aws - uses: aws-actions/configure-aws-credentials@v2 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} - - - name: Bump patch version - id: bumper - run: | - newVersion=$(npm version patch --no-git-tag-version | sed 's/v//g') - echo "new_version=$newVersion" >> $GITHUB_OUTPUT - - - name: Install project modules - run: npm ci --production - - - name: Create lambda archive - run: zip -r github-management-scripts.zip src/ node_modules/ - - - name: Get function state - id: function_state - run: | - state=$(aws lambda get-function --function-name ${{ secrets.LAMBDA_FUNCTION }} --query 'Configuration.State' --output text) - echo "state=$state" >> $GITHUB_OUTPUT - - - name: Verify function is in active state - if: steps.function_state.outputs.state != 'Active' - uses: actions/github-script@v6 - with: - script: core.setFailed('the function is being updated, please try again later') - - - name: Deploy archive to lambda - run: > - aws lambda update-function-code - --function-name ${{ secrets.LAMBDA_FUNCTION }} - --zip-file fileb://./github-management-scripts.zip - - - name: Wait for function to be updated - run: aws lambda wait function-updated --function-name ${{ secrets.LAMBDA_FUNCTION }} - - - name: Publish lambda function - id: publish_lambda - run: | - set -o pipefail - function_version=$(aws lambda publish-version --function-name ${{ secrets.LAMBDA_FUNCTION }} | jq -r ".Version") - echo "function_version=$function_version" >> $GITHUB_OUTPUT - - - name: Update alias Live with new function version - run: > - aws lambda update-alias - --function-name ${{ secrets.LAMBDA_FUNCTION }} - --name Live - --function-version ${{ steps.publish_lambda.outputs.function_version }} - - - name: Push and tag package modifications - run: | - git add package.json - git add package-lock.json - git commit -m "chore: updated package with ${{ steps.bumper.outputs.new_version }} [skip ci]" - git tag ${{ steps.bumper.outputs.new_version }} -m "Function v${{ steps.publish_lambda.outputs.function_version }}" - git push --follow-tags +#--- +#name: Deploy +# +#on: +# workflow_dispatch: +# +#jobs: +# deploy: +# runs-on: ubuntu-latest +# environment: deployment +# name: Build and deploy +# steps: +# - name: Checkout sources +# uses: actions/checkout@v3 +# with: +# ssh-key: ${{ secrets.DEPLOY_KEY }} +# +# - name: Install node 16 +# uses: actions/setup-node@v3 +# with: +# node-version: '16' +# cache: npm +# +# - name: Configure git +# run: | +# git config user.name "${{ github.actor }}" +# git config user.email "${{ github.actor }}@users.noreply.github.com" +# +# - name: Configure aws +# uses: aws-actions/configure-aws-credentials@v2 +# with: +# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} +# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# aws-region: ${{ secrets.AWS_REGION }} +# +# - name: Bump patch version +# id: bumper +# run: | +# newVersion=$(npm version patch --no-git-tag-version | sed 's/v//g') +# echo "new_version=$newVersion" >> $GITHUB_OUTPUT +# +# - name: Install project modules +# run: npm ci --production +# +# - name: Create lambda archive +# run: zip -r github-management-scripts.zip src/ node_modules/ +# +# - name: Get function state +# id: function_state +# run: | +# state=$(aws lambda get-function --function-name ${{ secrets.LAMBDA_FUNCTION }} --query 'Configuration.State' --output text) +# echo "state=$state" >> $GITHUB_OUTPUT +# +# - name: Verify function is in active state +# if: steps.function_state.outputs.state != 'Active' +# uses: actions/github-script@v6 +# with: +# script: core.setFailed('the function is being updated, please try again later') +# +# - name: Deploy archive to lambda +# run: > +# aws lambda update-function-code +# --function-name ${{ secrets.LAMBDA_FUNCTION }} +# --zip-file fileb://./github-management-scripts.zip +# +# - name: Wait for function to be updated +# run: aws lambda wait function-updated --function-name ${{ secrets.LAMBDA_FUNCTION }} +# +# - name: Publish lambda function +# id: publish_lambda +# run: | +# set -o pipefail +# function_version=$(aws lambda publish-version --function-name ${{ secrets.LAMBDA_FUNCTION }} | jq -r ".Version") +# echo "function_version=$function_version" >> $GITHUB_OUTPUT +# +# - name: Update alias Live with new function version +# run: > +# aws lambda update-alias +# --function-name ${{ secrets.LAMBDA_FUNCTION }} +# --name Live +# --function-version ${{ steps.publish_lambda.outputs.function_version }} +# +# - name: Push and tag package modifications +# run: | +# git add package.json +# git add package-lock.json +# git commit -m "chore: updated package with ${{ steps.bumper.outputs.new_version }} [skip ci]" +# git tag ${{ steps.bumper.outputs.new_version }} -m "Function v${{ steps.publish_lambda.outputs.function_version }}" +# git push --follow-tags diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f9a284d..5c9b83f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,31 +1,31 @@ ---- -name: Pull request build - -on: - pull_request: - branches: - - main - -jobs: - lint: - runs-on: ubuntu-latest - name: Lint project - permissions: - checks: write - contents: read - pull-requests: write - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Install node 16 - uses: actions/setup-node@v3 - with: - node-version: '16' - cache: npm - - - name: Install project modules - run: npm ci - - - name: Lint source files - run: npm run lint +#--- +#name: Pull request build +# +#on: +# pull_request: +# branches: +# - main +# +#jobs: +# lint: +# runs-on: ubuntu-latest +# name: Lint project +# permissions: +# checks: write +# contents: read +# pull-requests: write +# steps: +# - name: Checkout sources +# uses: actions/checkout@v3 +# +# - name: Install node 16 +# uses: actions/setup-node@v3 +# with: +# node-version: '16' +# cache: npm +# +# - name: Install project modules +# run: npm ci +# +# - name: Lint source files +# run: npm run lint diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index 588b134..7f26865 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -1,71 +1,71 @@ ---- -name: Stage - -on: - workflow_dispatch: - push: - branches: - - main - -jobs: - stage: - runs-on: ubuntu-latest - environment: staging - name: Stage the project - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Install node 16 - uses: actions/setup-node@v3 - with: - node-version: '16' - cache: npm - - - name: Configure aws - uses: aws-actions/configure-aws-credentials@v2 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} - - - name: Install project modules - run: npm ci --production - - - name: Create lambda archive - run: zip -r github-management-scripts.zip src/ node_modules/ - - - name: Get function state - id: function_state - run: | - state=$(aws lambda get-function --function-name ${{ secrets.LAMBDA_FUNCTION }} --query 'Configuration.State' --output text) - echo "state=$state" >> $GITHUB_OUTPUT - - - name: Verify function is in active state - if: steps.function_state.outputs.state != 'Active' - uses: actions/github-script@v6 - with: - script: core.setFailed('the function is being updated, please try again later') - - - name: Deploy archive to lambda - run: > - aws lambda update-function-code - --function-name ${{ secrets.LAMBDA_FUNCTION }} - --zip-file fileb://./github-management-scripts.zip - - - name: Wait for function to be updated - run: aws lambda wait function-updated --function-name ${{ secrets.LAMBDA_FUNCTION }} - - - name: Publish lambda function - id: publish_lambda - run: | - set -o pipefail - function_version=$(aws lambda publish-version --function-name ${{ secrets.LAMBDA_FUNCTION }} | jq -r ".Version") - echo "function_version=$function_version" >> $GITHUB_OUTPUT - - - name: Update alias Dev with new function version - run: > - aws lambda update-alias - --function-name ${{ secrets.LAMBDA_FUNCTION }} - --name Dev - --function-version ${{ steps.publish_lambda.outputs.function_version }} +#--- +#name: Stage +# +#on: +# workflow_dispatch: +# push: +# branches: +# - main +# +#jobs: +# stage: +# runs-on: ubuntu-latest +# environment: staging +# name: Stage the project +# steps: +# - name: Checkout sources +# uses: actions/checkout@v3 +# +# - name: Install node 16 +# uses: actions/setup-node@v3 +# with: +# node-version: '16' +# cache: npm +# +# - name: Configure aws +# uses: aws-actions/configure-aws-credentials@v2 +# with: +# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} +# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# aws-region: ${{ secrets.AWS_REGION }} +# +# - name: Install project modules +# run: npm ci --production +# +# - name: Create lambda archive +# run: zip -r github-management-scripts.zip src/ node_modules/ +# +# - name: Get function state +# id: function_state +# run: | +# state=$(aws lambda get-function --function-name ${{ secrets.LAMBDA_FUNCTION }} --query 'Configuration.State' --output text) +# echo "state=$state" >> $GITHUB_OUTPUT +# +# - name: Verify function is in active state +# if: steps.function_state.outputs.state != 'Active' +# uses: actions/github-script@v6 +# with: +# script: core.setFailed('the function is being updated, please try again later') +# +# - name: Deploy archive to lambda +# run: > +# aws lambda update-function-code +# --function-name ${{ secrets.LAMBDA_FUNCTION }} +# --zip-file fileb://./github-management-scripts.zip +# +# - name: Wait for function to be updated +# run: aws lambda wait function-updated --function-name ${{ secrets.LAMBDA_FUNCTION }} +# +# - name: Publish lambda function +# id: publish_lambda +# run: | +# set -o pipefail +# function_version=$(aws lambda publish-version --function-name ${{ secrets.LAMBDA_FUNCTION }} | jq -r ".Version") +# echo "function_version=$function_version" >> $GITHUB_OUTPUT +# +# - name: Update alias Dev with new function version +# run: > +# aws lambda update-alias +# --function-name ${{ secrets.LAMBDA_FUNCTION }} +# --name Dev +# --function-version ${{ steps.publish_lambda.outputs.function_version }} diff --git a/README.md b/README.md index 67d1fe5..b34aad3 100644 --- a/README.md +++ b/README.md @@ -182,28 +182,3 @@
npm run start:dev
-Our contributors emoji keys
-
-
-
Jorge Vallecillo 🚇 |
-