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

Move CircleCI jobs to GH Actions #1289

Merged
merged 5 commits into from
Sep 15, 2023
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
37 changes: 0 additions & 37 deletions .circleci/config.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .circleci/docker-helper.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Determine work branch
case "${CIRCLE_BRANCH}" in
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CircleCI gave us this for free, but it is now exported in the Build step of the new workflow in this PR.

case "${BRANCH_NAME}" in
"production")
export WORKING_STAGE="production";
;;
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/deploy_vz_api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Build & deploy the VZ API"

on:
push:
branches:
- master
- production
paths:
- ".github/workflows/deploy_vz_api.yml"
- ".github/workflows/aws-vz-api-helper.sh"
- "atd-cr3-api/**"
workflow_dispatch:
inputs:
description:
default: ""
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.8"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this bumps from 3.7 that was used in the CircleCI job. I think this is okay since it is what we used with the same tooling in the Moped workflow.

architecture: "x64"
# Get the code first
- name: "Checkout"
uses: actions/checkout@v3
# Run the shell commands using the AWS environment variables
- name: "Build"
env:
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ZAPPA_SETTINGS: ${{ secrets.ZAPPA_SETTINGS }}
run: |
export BRANCH_NAME=${GITHUB_REF##*/}
echo "SHA: ${GITHUB_SHA}"
echo "ACTION/BRANCH_NAME: ${BRANCH_NAME}"
echo "GR: ${GITHUB_REF}"
echo "PWD: $(pwd)"
source $(pwd)/.github/workflows/aws-vz-api-helper.sh
deploy_aws_lambda
Loading