feat: Provide experimental images built from main (#3699) #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Devcontainer image | |
on: | |
workflow_dispatch: | |
# no content, allows manual triggering | |
schedule: | |
# 5:30 pm every Sunday (UTC) | |
# to pick up any important bug fixes etc in base image | |
- cron: '30 17 * * 0' | |
push: | |
# run when changes pushed to main branch if any devcontainer files changed | |
branches: | |
- main | |
paths: | |
- .devcontainer/** | |
jobs: | |
# Based on: https://docs.github.com/en/actions/guides/publishing-docker-images#publishing-images-to-github-packages | |
build-devcontainer-image: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Log in to GitHub Docker Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: docker.pkg.github.com # ghcr.io not yet enabled for Azure org | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build & push Devcontainer image | |
uses: docker/build-push-action@v4 | |
with: | |
context: .devcontainer | |
push: true | |
# Build an image usable as cache-from, per: https://docs.docker.com/engine/reference/commandline/build/#specifying-external-cache-sources | |
build-args: BUILDKIT_INLINE_CACHE=1 | |
tags: | | |
docker.pkg.github.com/azure/azure-service-operator/aso-devcontainer:latest | |
docker.pkg.github.com/azure/azure-service-operator/aso-devcontainer:${{ github.sha }} |