name: Update Webassets on: push: branches: - master - teleport-v** jobs: build: runs-on: ubuntu-latest steps: # Get webapps, and the webapps.e submodule - name: Checkout webapps uses: actions/checkout@v3 with: ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} submodules: recursive fetch-depth: 0 # Get webassets, and the webassets.e submodule - name: Checkout webassets uses: actions/checkout@v3 with: repository: gravitational/webassets path: dist ref: ${{ github.ref_name }} ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} submodules: recursive fetch-depth: 0 # This workflow only runs on push to a protected branch, so the code # has already been reviewed and is trusted. This means it is safe to # the version of the action that we checked out and we don't need to # always use master. - name: Build webassets uses: ./.github/actions/docker-build-webassets - name: Push updates run: | git config --global user.email github-goteleport-core-svc@goteleport.com git config --global user.name "$GITHUB_ACTOR" echo "Updating webassets.e" cd dist/e git add -A git status git commit -m "Update webassets.e from gravitational/webapps@$GITHUB_SHA" --allow-empty git push origin HEAD:$GITHUB_REF_NAME echo "Updating webassets" cd .. git add -A git status git commit -m "Update webassets from gravitational/webapps@$GITHUB_SHA" --allow-empty git push origin HEAD:$GITHUB_REF_NAME