adding changes #7
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: Dev Container Build and Push Image | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "master" | |
tags: | |
- "v*.*.*" | |
pull_request: | |
branches: [master] | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
id: checkout | |
uses: actions/checkout@v1 | |
- | |
name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.REGISTRY_TOKEN }} | |
- | |
name: Build Dev Container Image | |
uses: devcontainers/[email protected] | |
with: | |
subFolder: .github | |
imageName: ghcr.io/${{ github.repository }} | |
push: never | |
- name: Test Container Image | |
run: | | |
docker run --rm ghcr.io/${{ github.repository }} /bin/bash -c "bash test.sh" | |
- name: Push Container Image | |
if: ${{ success() }} | |
run: | | |
docker push ghcr.io/${{ github.repository }} |