Merge pull request #9 from khiron/main #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: Build and Push Docker images | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- Build-container-images-in-workflow | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Log in to GitHub Container Registry | |
run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
- name: Build and Push Base Docker image | |
run: | | |
docker build -f .devcontainer/Dockerfile . \ | |
-t ghcr.io/${{ github.repository_owner }}/workshop:latest | |
docker push ghcr.io/${{ github.repository_owner }}/workshop:latest | |
- name: Build and Push Docker image prepopulated with apes_112 | |
run: | | |
docker build -f .devcontainer/Dockerfile.apes_112 . \ | |
-t ghcr.io/${{ github.repository_owner }}/workshop:apes_112 | |
docker push ghcr.io/${{ github.repository_owner }}/workshop:apes_112 |