Files
vscode/.github/workflows/devcontainer-cache.yml
dependabot[bot] 4efed9e099 Bump azure/login from 1.3.0 to 1.4.6
Bumps [azure/login](https://github.com/azure/login) from 1.3.0 to 1.4.6.
- [Release notes](https://github.com/azure/login/releases)
- [Commits](77f1b2e3fb...92a5484dfa)

---
updated-dependencies:
- dependency-name: azure/login
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-20 20:42:08 +00:00

42 lines
1.2 KiB
YAML

name: VS Code Repo Dev Container Cache Image Generation
on:
workflow_dispatch:
push:
# Currently doing this for main, but could be done for PRs as well
branches:
- "main"
# Only updates to these files result in changes to installed packages, so skip otherwise
paths:
- "**/package-lock.json"
- "**/yarn.lock"
jobs:
devcontainer:
name: Generate cache image
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v3
- name: Azure CLI login
id: az_login
uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2
with:
creds: ${{ secrets.AZ_ACR_CREDS }}
- name: Build and push
id: build_and_push
run: |
set -e
ACR_REGISTRY_NAME=$(echo ${{ secrets.CONTAINER_IMAGE_REGISTRY }} | grep -oP '(.+)(?=\.azurecr\.io)')
az acr login --name $ACR_REGISTRY_NAME
GIT_BRANCH=$(echo "${{ github.ref }}" | grep -oP 'refs/(heads|tags)/\K(.+)')
if [ "$GIT_BRANCH" == "" ]; then GIT_BRANCH=main; fi
.devcontainer/cache/build-cache-image.sh "${{ secrets.CONTAINER_IMAGE_REGISTRY }}/public/vscode/devcontainers/repos/microsoft/vscode" "${GIT_BRANCH}"