Bump qs from 6.7.0 to 6.11.0 in /products/zilliqa-stats (#61) #30
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
name: "Create application production" | |
on: | |
pull_request: | |
branches: | |
- release/* | |
push: | |
tags: | |
- "v*" | |
branches: | |
- release/* | |
jobs: | |
build-docker: | |
# https://github.com/orgs/community/discussions/26281 | |
runs-on: ubuntu-22.04 | |
name: "Build and deploy" | |
env: | |
AWS_REGION: us-west-2 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{github.event.pull_request.head.ref}} | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
fetch-depth: 0 | |
- name: Preparing merged branches | |
# Fetch the ref of the base branch, just the single commit. | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Zilliqa Bot" | |
echo "Running git merge --squash ${{ github.head_ref }}" | |
git merge --squash ${{ github.head_ref }} | |
echo "Running git checkout main" | |
git checkout main | |
git fetch --all --tags | |
git pull --all | |
# Checking out the base branch to make this our working branch and | |
# merge the head | |
echo "Running git checkout ${{ github.base_ref }}" | |
git checkout ${{ github.base_ref }} | |
git fetch --all --tags | |
git pull --all | |
- name: Committing head | |
# Fetch the ref of the base branch, just the single commit. | |
run: | | |
echo "Running git merge --squash ${{ github.head_ref }}" | |
git merge --squash ${{ github.head_ref }} && \ | |
git add . -A && \ | |
git commit -m "Finish merge" || echo "Nothing to merge" | |
python config/workspace-status.py | |
- name: Install SSH key | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_SECRET_KEY }} | |
- name: Bazel cache | |
id: cache-bazel-debug | |
uses: actions/[email protected] | |
with: | |
path: ~/.cache/bazel/ | |
key: ${{ runner.os }}-bazel-debug | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: "Build and push Docker" | |
run: | | |
bazelisk run --test_output=all --keep_going --disk_cache=~/.cache/bazel/ //products/developer-portal:push_image | |
bazelisk run --test_output=all --keep_going --disk_cache=~/.cache/bazel/ //products/devex:push_image | |
- name: "Creating Devops repo update for PR" | |
if: github.event_name == 'pull_request' | |
run: | | |
bazelisk run //cd:create_production -- PR $(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
DEVOPS_ACCESS_TOKEN: ${{ secrets.DEVOPS_ACCESS_TOKEN }} | |
BUILD_URI_SUFFIX: ${{ github.head_ref }} | |
- name: "Creating Devops repo update for push and/or tag" | |
if: github.event_name != 'pull_request' | |
run: | | |
bazelisk run //cd:create_production -- HEAD $(git rev-parse --abbrev-ref HEAD) | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
DEVOPS_ACCESS_TOKEN: ${{ secrets.DEVOPS_ACCESS_TOKEN }} | |
BUILD_URI_SUFFIX: ${{ github.ref }} |