Skip to content

Bump golang from 1.22.7-bookworm to 1.22.9-bookworm (#4111) #3516

Bump golang from 1.22.7-bookworm to 1.22.9-bookworm (#4111)

Bump golang from 1.22.7-bookworm to 1.22.9-bookworm (#4111) #3516

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
pull_request:
jobs:
deploy-staging:
# Forks and dependabot cannot access secrets so the job would fail.
# Run for non dependabot PRs or regular pushes to web-platform-tests/wpt.fyi
if: |
(github.repository == 'web-platform-tests/wpt.fyi') &&
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'web-platform-tests/wpt.fyi' && github.actor != 'dependabot[bot]') ||
(github.event_name != 'pull_request'))
name: Deploy staging.wpt.fyi
runs-on: ubuntu-latest
env:
DOCKER_IMAGE: webplatformtests/wpt.fyi:latest
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: secrets
run: echo "$GCLOUD_KEY_FILE_JSON" > client-secret.json
env:
GCLOUD_KEY_FILE_JSON: ${{ secrets.GCLOUD_KEY_FILE_JSON }}
- name: Set DOCKER_INSTANCE
run: echo "DOCKER_INSTANCE=wptd-dev-$(echo $RANDOM)" >> $GITHUB_ENV
- name: Docker config check
uses: dorny/paths-filter@v3
id: dockerchanges
with:
filters: |
dockerconf:
- 'Dockerfile'
# run only if Docker configuration was changed
- if: steps.dockerchanges.outputs.dockerconf == 'true'
name: Rebuild Docker image
run: docker build -t webplatformtests/wpt.fyi:latest .
# run only if Docker configuration was not changed
- if: steps.dockerchanges.outputs.dockerconf == 'false'
name: Fetch latest Docker image
run: docker pull "${DOCKER_IMAGE}"
- name: pre-installation
run: bash ./util/docker-dev/run.sh -d -q
- name: installation
run: docker exec -t "${DOCKER_INSTANCE}" make go_build;
# Set -f for main branch.
- name: set deployment flag
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: echo "FORCE_DEPLOYMENT=-f" >> $GITHUB_ENV
- name: deploy webapp
run: ./util/deploy-staging.sh "${FORCE_DEPLOYMENT}" webapp/web/app.staging.yaml
- name: Run go_large_test in main
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: docker exec -t "${DOCKER_INSTANCE}" make go_large_test STAGING=true
- name: build processor
run: ./util/deploy-staging.sh "${FORCE_DEPLOYMENT}" results-processor/app.staging.yaml
- name: build searchcache
run: ./util/deploy-staging.sh "${FORCE_DEPLOYMENT}" api/query/cache/service/app.staging.yaml
- name: Clean up versions in main
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: docker exec -t "${DOCKER_INSTANCE}" make cleanup_staging_versions