Merge branch 'main' into develop #192
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
# Github workflow runner instructions using cutomized actions | |
name: Refresher CI — Docker | |
on: [ push ] | |
jobs: | |
build-push: | |
runs-on: ubuntu-latest | |
name: build docker | |
steps: | |
########## CHECK OUT REPO AND PRINT REPO INFO ####### | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Intro to job runner | |
run: | | |
echo "job runner details " | |
echo "Event: ${{ github.event_name }}" | |
echo "os: ${{ runner.os }} server." | |
echo "Repository: ${{ github.repository }}:${{ github.ref_name }}." | |
ls ${{ github.workspace }} | |
######### DOCKER BUILD AND PUSH CUSTOM ACTION ############# | |
- name: Docker Build and Push | |
uses: ./.github/actions/docker-build-push-image | |
with: | |
username: | |
${{ github.REPOSITORY_OWNER }} | |
password: | |
${{ secrets.pta }} | |
registry: | |
ghcr.io | |
repository: | |
${{ github.repository }} | |
tag: | |
${{ github.ref_name }} | |
file: | |
docker/Dockerfile | |
test_docker: | |
needs: build-push | |
runs-on: ubuntu-latest | |
name: test docker | |
steps: | |
########## CHECK OUT REPO AND PRINT REPO INFO ####### | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
######### DOCKER LOGIN AND PULL CUSTOM ACTION ############# | |
- name: Docker Login and Pull | |
uses: ./.github/actions/docker-pull-image | |
with: | |
username: | |
${{ github.REPOSITORY_OWNER }} | |
password: | |
${{ secrets.pta }} | |
registry: | |
ghcr.io | |
repository: | |
${{ github.repository }} | |
tag: | |
${{ github.ref_name }} | |
- name: Run tests in container | |
run: | | |
docker run ghcr.io/${{ github.repository }}:${{ github.ref_name }} /bin/bash -c " | |
pip install coverage && | |
coverage run manage.py test apps | |
" |