Skip to content

Open Graph

Open Graph #29

Workflow file for this run

name: "Open Graph"
on:
workflow_dispatch:
jobs:
images:
name: Images
runs-on: ubuntu-latest
# Add "id-token" for Google Authentication
permissions:
id-token: write
steps:
- name: Install dependencies
run: |
sudo apt-get install \
jq \
sqlite3 \
libparallel-forkmanager-perl \
libapp-options-perl \
libencode-perl \
libyaml-libyaml-perl \
libjson-xs-perl \
libdbd-csv-perl \
libdbd-sqlite3-perl \
libtemplate-perl \
libgd-perl \
fonts-roboto
- name: Checkout
uses: actions/checkout@v4
# Configure Workload Identity Federation via a credentials file.
- id: auth
name: 🔐 Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: 'projects/187514662523/locations/global/workloadIdentityPools/github-com/providers/github-com-oidc'
service_account: 'gh-compute-machine-types@gcloud-compute-344913.iam.gserviceaccount.com'
export_environment_variables: true
# Install gcloud, `setup-gcloud` automatically picks up authentication from `auth`.
- name: '🔧 Set up Google Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
# Now you can run gcloud commands authenticated as the impersonated service account.
- name: Download pricing
run: |
cd build || exit 9
curl -OL "https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/raw/master/pricing.yml" || exit 9
- name: Run build script
run: |
cd build || exit 9
bash build.sh || exit 9
- name: Create images
run: |
cd build || exit 9
perl opengraph.pl --processes=4 || exit 9
- name: Deploy
run: gcloud storage cp --recursive opengraph/* gs://opengraph.gcloud-compute.com || exit 9
#run: gsutil -m rsync -r opengraph gs://opengraph.gcloud-compute.com || exit 9