Merge branch 'test1' of github.com:kostrykin/mobi-devcontainer-python… #38
Workflow file for this run
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 docker image and push to Docker Hub | |
on: | |
push: | |
tags: | |
- '**' | |
branches: | |
- 'test*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Initialize | |
uses: actions/checkout@v2 | |
- | |
run: | | |
sudo apt update | |
sudo apt install nodejs | |
- | |
run: sudo npm install -g @devcontainers/cli | |
- | |
name: Build image | |
run: devcontainer build --workspace-folder ingredients --image-name ${{ github.repository }}:${{ github.ref_name }} | |
- | |
name: Login to registry (Docker Hub) | |
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Deploy image to registry | |
run: docker push ${{ github.repository }}:${{ github.ref_name }} | |
- | |
name: Logout from registry | |
run: docker logout |