chore: adding Build and deploy VC-API
prototype
#4
Workflow file for this run
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: Build and deploy VC-API | |
on: [push, workflow_dispatch] | |
jobs: | |
cancel-previous: | |
name: 'Cancel Previous Runs' | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
steps: | |
- uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
unique_id: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate unique id | |
id: unique_id | |
run: echo "id=$(uuidgen) >> $GITHUB_OUTPUT" | |
outputs: | |
unique_id: ${{ steps.unique_id.outputs.id }} | |
install-build-and-push: | |
runs-on: ubuntu-latest | |
needs: [cancel-previous, unique_id] | |
steps: | |
- name: Get GHA environment name | |
id: env_vars | |
run: | | |
echo "Running on branch ${{ github.ref }}" | |
echo "aws_region=${{ secrets.AWS_REGION }} >> $GITHUB_OUTPUT" | |
echo "aws_access_key_id_ssi=${{ secrets.DEV_AWS_ACCESS_KEY_ID }} >> $GITHUB_OUTPUT" | |
echo "aws_secret_key_ssi=${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }} >> $GITHUB_OUTPUT" | |
echo "aws_ecr_repository_ssi=${{ secrets.DEV_ECR_REPOSITORY }} >> $GITHUB_OUTPUT" | |
echo "aws_access_key_id_idc=${{ secrets.DEV_AWS_ACCESS_KEY_ID_IDC }} >> $GITHUB_OUTPUT" | |
echo "aws_secret_key_idc=${{ secrets.DEV_AWS_SECRET_ACCESS_KEY_IDC }} >> $GITHUB_OUTPUT" | |
echo "aws_ecr_repository_idc=${{ secrets.DEV_ECR_REPOSITORY_IDC }} >> $GITHUB_OUTPUT" | |
echo "argocd_url=${{ secrets.DEV_ARGOCD_URL }} >> $GITHUB_OUTPUT" | |
echo "argocd_username=${{ secrets.DEV_ARGOCD_USERNAME }} >> $GITHUB_OUTPUT" | |
echo "argocd_password=${{ secrets.DEV_ARGOCD_PASS }} >> $GITHUB_OUTPUT" | |
- name: Check out vc-api-owf | |
run: | | |
git clone https://github.com/energywebfoundation/vc-api-owf |