Skip to content

build(deps): bump step-security/harden-runner (#1946) #917

build(deps): bump step-security/harden-runner (#1946)

build(deps): bump step-security/harden-runner (#1946) #917

# This workflow will build a middleman project with bundle
name: Build and Preview
on:
push:
branches:
- master
permissions:
id-token: write
contents: read
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
complete_build:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Ruby
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
bundler-cache: true
- name: Run the build
env:
RUN_EXTERNAL_CHECKS: true
run: bundle exec rake build --verbose
publish_preview:
needs: complete_build
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
bundler-cache: true
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3
with:
role-to-assume: "${{ secrets.PREVIEW_AWS_ROLE_TO_ASSUME }}"
aws-region: "${{ secrets.AWS_REGION }}"
- name: Set up upstream and publish to S3
env:
BASE_URL: 'https://preview.gocd.org'
DEPLOY_ENVIRONMENT: 'preview'
AWS_BUCKET: "${{ secrets.PREVIEW_AWS_BUCKET }}"
RUN_EXTERNAL_CHECKS: false
run: |
bundle exec rake publish --trace