checkout
This commit is contained in:
10
.github/workflows/issue.yml
vendored
10
.github/workflows/issue.yml
vendored
@@ -6,11 +6,13 @@ jobs:
|
||||
Issue:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- run: echo "github ${{ github }}"
|
||||
- run: echo "github.event_name ${{ github.event_name }}"
|
||||
- run: echo "github.ref ${{ github.ref }}"
|
||||
- run: echo "github.repository ${{ github.repository }}"
|
||||
- run: echo "runner.os ${{ runner.os }}"
|
||||
- run: echo "${{ github.workspace }}"
|
||||
- run: ls ${{ github.workspace }}
|
||||
- run: echo "${{ job.status }}."
|
||||
- run: echo "github.workspace ${{ github.workspace }}"
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v2
|
||||
- run: ls "${{ github.workspace }}"
|
||||
- run: "${{ github.workspace }}/action.py"
|
||||
- run: echo "job.status ${{ job.status }}."
|
||||
|
||||
18
action.py
Executable file
18
action.py
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import random
|
||||
import re
|
||||
|
||||
image_re = re.compile('^image::{china-dictatorship-media-base}/([^/[]+)')
|
||||
|
||||
images = []
|
||||
with open('README.adoc', 'r') as f:
|
||||
for line in f:
|
||||
line = line.rstrip()
|
||||
match = image_re.match(line)
|
||||
if match:
|
||||
images.append(match.group(1))
|
||||
|
||||
images = random.sample(images, 10)
|
||||
for image in images:
|
||||
print('https://raw.githubusercontent.com/cirosantilli/china-dictatorship-media/master/' + image)
|
||||
Reference in New Issue
Block a user