Skip to content

Merge pull request #81 from kwcckw/dev #1149

Merge pull request #81 from kwcckw/dev

Merge pull request #81 from kwcckw/dev #1149

Workflow file for this run

name: Shabby Pages daily build
on:
push:
branches: [dev]
tags:
- '*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get latest tag
id: tag
run: |
echo "::set-output name={TAG}::{git tag | sort -n | tail -1}"
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Generate the images
env:
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
run: |
pip install git+https://github.com/sparkfish/augraphy
pip install -r requirements.txt
python daily_build.py
- uses: actions/upload-artifact@v3
with:
name: sample-images
path: cropped/
- uses: actions/upload-artifact@v3
with:
name: logs
path: logs/
- uses: actions/upload-artifact@v3
with:
name: names
path: names/
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: sample-images
path: cropped
- name: Debug
run: |
pwd
ls -R
- name: Daily Shabby Pages Sample
uses: softprops/action-gh-release@v1
with:
files: cropped/shabby/*
tag_name: ${{steps.tag.outputs.TAG}}
tweet:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: sample-images
path: cropped
- name: Debug
run: |
pwd
ls -R
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Post Tweet
env:
CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
run: |
pip install -r requirements.txt
python tweet.py