switch extension ID over #6
This file contains hidden or 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 image on push | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Make IMAGE_BASE | |
| id: image_base | |
| env: | |
| REPO: ${{ github.repository }} | |
| run: echo "IMAGE_BASE=ghcr.io/${REPO,,}" >> $GITHUB_ENV && echo $IMAGE_BASE | |
| - name: Login to GHCR | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up QEMU (optional) | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push SHA-tag image | |
| id: build | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| file: ./.devcontainer/Dockerfile | |
| push: true | |
| build-args: | | |
| GITHUB_REPOSITORY=${{ github.repository }} | |
| tags: | | |
| ${{ env.IMAGE_BASE }}:${{ github.sha }} | |
| ${{ env.IMAGE_BASE }}:latest |