Skip to content

Commit

Permalink
compile,readme,stats,test: Rearrange and rename steps
Browse files Browse the repository at this point in the history
Group "install" and "checkout" steps separately.  Treat the step that
makes the workflow scripts available as an "install" step, consistently
naming it "Install scripts".  Treat the step that makes the dependencies
available as a "checkout" step.
  • Loading branch information
tarsius committed Oct 17, 2024
1 parent 376e95b commit a9aee3a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: purcell/setup-emacs@master
with:
version: 29.3
- name: 'Install workflow scripts'
- name: 'Install scripts'
uses: actions/checkout@v4
with:
repository: emacscollective/workflows
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs }}
- name: 'Checkout scripts'
- name: 'Install scripts'
uses: actions/checkout@v4
with:
repository: emacscollective/workflows
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
name: "Export readme"
runs-on: ubuntu-latest
steps:
- name: 'Checkout ${{ github.repository }}'
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 'Install Emacs'
uses: purcell/setup-emacs@master
with:
version: 29.3
- name: 'Checkout ${{ github.repository }}'
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 'Export readme'
run: make html
- name: 'Configure credentials'
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,40 @@ on:
required: true
aws-secret-access-key:
required: true
env:
pwd: ${{ github.event.repository.name }}
jobs:
statistics:
name: 'Generate statistics'
# ubuntu-24.04 removed python2
runs-on: ubuntu-22.04
steps:
- name: 'Checkout ${{ github.repository }}'
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: 'Set timezone'
run: sudo timedatectl set-timezone Europe/Zurich
- name: 'Install gitstats dependencies'
run: sudo apt update && sudo apt install -y gnuplot python2
- name: 'Install gitstats'
uses: actions/checkout@v4
with:
repository: tarsius/gitstats
path: gitstats
path: _gitstats
persist-credentials: false
- name: 'Checkout ${{ github.repository }}'
uses: actions/checkout@v4
with:
path: ${{ env.pwd }}
fetch-depth: 0
persist-credentials: false
- name: 'Configure timezone'
run: sudo timedatectl set-timezone Europe/Zurich
- name: 'Generate statistics'
run: GITSTATS=../gitstats/gitstats make stats
working-directory: ${{ env.pwd }}
# GITSTATS must be relative to our docs/ directory.
run: GITSTATS=../../_gitstats/gitstats make stats
- name: 'Configure credentials'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-central-1
aws-access-key-id: ${{ secrets.aws-access-key-id }}
aws-secret-access-key: ${{ secrets.aws-secret-access-key }}
- name: 'Publish statistics'
working-directory: ${{ env.pwd }}
run: make stats-upload
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: purcell/setup-emacs@master
with:
version: 29.3
- name: 'Install workflow scripts'
- name: 'Install scripts'
uses: actions/checkout@v4
with:
repository: emacscollective/workflows
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs }}
- name: 'Checkout scripts'
- name: 'Install scripts'
uses: actions/checkout@v4
with:
repository: emacscollective/workflows
Expand All @@ -67,6 +67,7 @@ jobs:
uses: actions/checkout@v4
with:
path: ${{ env.pwd }}
fetch-depth: 0
persist-credentials: false
- name: 'Install dependencies'
working-directory: ${{ env.pwd }}
Expand Down

0 comments on commit a9aee3a

Please sign in to comment.