chore(cli): Cargo.lock
をバージョン管理するように変更 (#195)
#101
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: Devcontainer CI | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
changes: | |
name: Changes | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
packages: write | |
outputs: | |
dockerfile: ${{ steps.changes.outputs.dockerfile }} | |
tool-versions: ${{ steps.changes.outputs.tool-versions }} | |
workflows: ${{ steps.changes.outputs.workflows }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Check Dockerfile files changed | |
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
id: changes | |
with: | |
filters: | | |
dockerfile: | |
- 'Dockerfile' | |
tool-versions: | |
- '.tool-versions' | |
workflows: | |
- '.github/workflows/devcontainer-ci.yml' | |
build: | |
name: Build and push Docker image | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
packages: write | |
needs: changes | |
if: needs.changes.outputs.dockerfile == 'true' || needs.changes.outputs.tool-versions == 'true' || needs.changes.outputs.workflows == 'true' | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@06895751d15a223ec091bea144ad5c7f50d228d0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and run dev container task | |
uses: devcontainers/ci@a56d055efecd725e8cfe370543b6071b79989cc8 | |
with: | |
imageName: ghcr.io/${{ github.repository }}-devcontainer | |
imageTag: ${{ github.ref_name }} |