From b407c65500b4c9d33ace5030d5296af4eb31853d Mon Sep 17 00:00:00 2001 From: Ivy Fan-Chiang Date: Sun, 15 Oct 2023 07:38:08 -0400 Subject: [PATCH] wipe workflow --- .github/.github/workflows/deploy_bundle.yml | 50 --------------------- 1 file changed, 50 deletions(-) delete mode 100644 .github/.github/workflows/deploy_bundle.yml diff --git a/.github/.github/workflows/deploy_bundle.yml b/.github/.github/workflows/deploy_bundle.yml deleted file mode 100644 index cf20db1..0000000 --- a/.github/.github/workflows/deploy_bundle.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Deploy Bundle -on: [push] -permissions: - contents: write - -jobs: - Deploy-Bundle: - name: Deploy Bundle - runs-on: ubuntu-latest - permissions: write-all - steps: - - name: Check out repository code - uses: actions/checkout@v4 - - name: Install Deployment Tools - run: wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg && echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list && sudo apt-get update && sudo apt-get install -y ansible terraform - - name: Versions - run: ansible --version && terraform --version - - name: Create SSH Key - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ssh_priv: ${{ secrets.SSH_PRIV_KEY }} - REPO: ${{ github.event.repository.name }} - if: ${{ env.ssh_priv == '' }} - run: ssh-keygen -q -t rsa -f ~/.ssh/id_rsa -N "" && cp ~/.ssh/id_rsa.pub deploy_bundle/pub_key #&& cat ~/.ssh/id_rsa | gh secret -R $GITHUB_REPOSITORY set SSH_PRIV_KEY - - name: Terraform Init - run: cd deploy_bundle && terraform init && ls -a -l - - name: Get Google Cloud Platform Credentials - env: - GCP_CREDS: ${{ secrets.GCP_CREDS }} - run: cd deploy_bundle && echo $GCP_CREDS > gcp_creds.json - - name: Terraform Plan - run: cd deploy_bundle && terraform plan - - name: Terraform Apply - run: cd deploy_bundle && terraform apply -auto-approve - - name: Commit Terraform State File - run: | - cd deploy_bundle - git add *.tfstate - git config user.name "Deploy Bundle Action" --global - git config user.email "github-actions[bot]@users.noreply.github.com" --global - git commit --message "Commit State File" - git push - - name: Generate Ansible Configuration - run: | - cd deploy_bundle - python3 ansible.py - - name: Run Ansible Playbook - run: | - cd deploy_bundle - ansible-playbook nginx.yml