Skip to content

TUF-on-CI publish

TUF-on-CI publish #172

Workflow file for this run

name: TUF-on-CI publish
permissions: {}
on:
workflow_dispatch:
inputs:
ref:
type: string
required: false
jobs:
build:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- id: build-and-upload-repository
uses: theupdateframework/tuf-on-ci/actions/upload-repository@fce107eeb8b1887239ca3a694dc250fcabf49c7f # v0.14.0
with:
gh_pages: true
ref: ${{ inputs.ref }}
metadata_path: './'
deploy-to-pages:
permissions:
pages: write
id-token: write # for authenticating to GH Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy TUF-on-CI repository to GitHub Pages
id: deployment
uses: actions/deploy-pages@decdde0ac072f6dcbe43649d82d9c635fff5b4e4 # v4.0.4
test-deployed-pages:
needs: deploy-to-pages
permissions:
issues: 'write' # for modifying Issues
id-token: 'write' # for signing with the GitHub Actions workflow identity
uses: ./.github/workflows/test.yml
deploy-to-gcs:
needs: [test-deployed-pages]
permissions:
id-token: 'write' # for authenticating with OIDC
uses: ./.github/workflows/deploy-to-gcs.yml
with:
gcp_workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }}
gcp_service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
test-deployed-gcs:
needs: [deploy-to-gcs]
if: always() && !failure() && !cancelled()
permissions:
issues: 'write' # for modifying Issues
id-token: 'write' # for signing with the GitHub Actions workflow identity
uses: ./.github/workflows/test-gcs.yml
update-issue:
runs-on: ubuntu-latest
needs: [build, deploy-to-pages, test-deployed-pages, deploy-to-gcs, test-deployed-gcs]
if: always() && !cancelled()
permissions:
issues: 'write' # for modifying Issues
steps:
- name: Update the issue for the workflow
uses: theupdateframework/tuf-on-ci/actions/update-issue@fce107eeb8b1887239ca3a694dc250fcabf49c7f # v0.14.0
with:
token: ${{ secrets.TUF_ON_CI_TOKEN || secrets.GITHUB_TOKEN }}
success: ${{ !contains(needs.*.result, 'failure') }}