Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
feat(ci): Spin crc-cloud in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lmilbaum committed Feb 16, 2023
1 parent 6519009 commit 6648d67
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/crc-cloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: crc-cloud

on:
pull_request:
branches:
- main

workflow_dispatch:

jobs:
crc-cloud:
runs-on: ubuntu-latest

permissions:
id-token: write
contents: write

steps:
- name: Write pullsecret
env:
PULLSECRET_BASE64: ${{ secrets.PS_64 }}
run: |
echo $PULLSECRET_BASE64 | base64 --decode > pullsecret.txt
- name: Write boot key
run: echo "${{ secrets.KEY }}" > key.txt

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.ROLE }}
aws-region: eu-west-2

- run: |
docker run \
-v ${PWD}:/workspace:z \
-e AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \
-e AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \
-e AWS_DEFAULT_REGION=eu-west-2 quay.io/crcont/crc-cloud:v0.0.2 \
create aws \
--project-name "crc-ocp412" \
--backed-url "file:///workspace" \
--output "/workspace" \
--aws-ami-id "ami-019669c0960dbcf14" \
--pullsecret-filepath /workspace/pullsecret.txt \
--key-filepath /workspace/key.txt
- run: |
docker run \
-v ${PWD}:/workspace:z \
-e AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \
-e AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \
-e AWS_DEFAULT_REGION=eu-west-2 \
quay.io/crcont/crc-cloud:v0.0.2 \
destroy \
--project-name "crc-ocp412" \
--backed-url "file:///workspace" \
--provider "aws"

0 comments on commit 6648d67

Please sign in to comment.