Build devcontainer image #13
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: | |
push: | |
branches: | |
- main | |
paths: | |
- .devcontainer/** | |
schedule: | |
- cron: '0 0 1 * *' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- .devcontainer/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Log in to the GitHub container registry | |
uses: docker/[email protected] | |
if: github.event_name != 'pull_request' | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Build and Push | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: .devcontainer/Dockerfile | |
tags: ghcr.io/${{ github.repository_owner }}/devcontainer:addons | |
push: ${{ github.event_name != 'pull_request' }} | |
platforms: linux/amd64,linux/arm64 |