Skip to content

Update token secret #20

Update token secret

Update token secret #20

Workflow file for this run

name: Build, Test, and Publish
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-13]
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Create and activate virtual environment
run: |
python3 -m venv venv
source venv/bin/activate
- name: Install dependencies
run: |
source venv/bin/activate
pip3 install . -v
- name: Test the package
run: |
source venv/bin/activate
#pytest to come
docker-publish:
needs: test
runs-on: ubuntu-latest # Docker actions are run on Linux
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.Docker }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest
- name: Verify the Docker image
run: |
docker pull ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest
docker run ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest