Skip to content

samba-container build and test #86

samba-container build and test

samba-container build and test #86

name: samba-container build and test
on:
push:
branches:
- master
pull_request:
# Allow for manually running
workflow_dispatch:
# Run at 02:42 UTC every Saturday
schedule:
- cron: '42 2 * * 6'
jobs:
build-test-deploy:
runs-on: ubuntu-latest
permissions:
packages: write
env:
REPO: crops/samba
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
GHCR_USERNAME: ${{ github.actor }}
GHCR_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
# Install packages on the runner
- name: install smbclient
run: |
sudo apt-get update
sudo apt-get install smbclient
# Build the image
- name: build
run: docker build -t ${REPO} .
# Test the image
- name: test
run: |
pip install pytest>3.0
sudo apt-get install -y cifs-utils
pytest -v
# Deploy the images
- name: deploy
run: bash deploy.sh