diff --git a/.github/workflows/pulumi_preview.yaml b/.github/workflows/pulumi_preview.yaml new file mode 100644 index 0000000..da7d614 --- /dev/null +++ b/.github/workflows/pulumi_preview.yaml @@ -0,0 +1,41 @@ +name: Pulumi Preview +on: + pull_request: + branches: + - main +permissions: + id-token: write + contents: read +jobs: + preview: + name: Pulumi Preview + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + with: + fetch-depth: 1 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: arn:aws:iam::593291632749:role/data-engineering-ga-exports + role-session-name: githubaction + role-skip-session-tagging: true + role-duration-seconds: 3600 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Pulumi Preview + uses: pulumi/actions@v4 + env: + PULUMI_CONFIG_PASSPHRASE: "" + with: + command: preview + stack-name: "data-engineering-exports" + cloud-url: s3://data-engineering-pulumi.analytics.justice.gov.uk \ No newline at end of file diff --git a/.github/workflows/pulumi_up.yaml b/.github/workflows/pulumi_up.yaml new file mode 100644 index 0000000..2b1e30d --- /dev/null +++ b/.github/workflows/pulumi_up.yaml @@ -0,0 +1,41 @@ +name: Pulumi Up +on: + push: + branches: + - main +permissions: + id-token: write + contents: read +jobs: + up: + name: Pulumi Up + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + with: + fetch-depth: 1 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: arn:aws:iam::593291632749:role/data-engineering-ga-exports + role-session-name: githubaction + role-skip-session-tagging: true + role-duration-seconds: 3600 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Pulumi Up + uses: pulumi/actions@v4 + env: + PULUMI_CONFIG_PASSPHRASE: "" + with: + command: up + stack-name: "data-engineering-exports" + cloud-url: s3://data-engineering-pulumi.analytics.justice.gov.uk \ No newline at end of file