Skip to content

Commit

Permalink
ci: code cleanup and formatting (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyoungstudios authored May 31, 2024
1 parent a581d37 commit 6ead493
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 34 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/build_alfa_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: Build Alfa CLI

on:
push:
branches: [ main ]
branches:
- main
paths:
- 'bin/**'
- 'lib/**'
- "bin/**"
- "lib/**"
workflow_dispatch:

jobs:
Expand All @@ -19,13 +20,15 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-depth: "0"

- name: Bump version and create tag
id: create-tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true

- name: Create release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -39,12 +42,12 @@ jobs:

strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-depth: "0"

- uses: dart-lang/[email protected]
with:
Expand Down Expand Up @@ -72,7 +75,8 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-depth: "0"

- name: Setup arm emulation with qemu
run: |
sudo apt-get update -q -y
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ name: Lint
# Run only one unique workflow at a time on a pr
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

on:
pull_request:
branches: [ main ]
branches:
- main
paths:
- 'bin/**'
- 'lib/**'
- 'tests/**.dart'
- 'pubspec.yaml'
- ".github/workflows/lint.yml"
- "bin/**"
- "lib/**"
- "tests/**.dart"
- "pubspec.yaml"
workflow_dispatch:

jobs:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/publish_dart_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ name: Publish Dart Docker Image

on:
push:
branches: [ main ]
branches:
- main
paths:
- '.github/workflows/publish_dart_docker.yml'
- 'dart.Dockerfile'
- '.dart_config/**'
- ".github/workflows/publish_dart_docker.yml"
- ".dart_config/**"
- "dart.Dockerfile"
schedule:
# on the 2nd and 16th of every month
- cron: '0 0 2,16 * *'
# on the 2nd and 16th of every month
- cron: "0 0 2,16 * *"
workflow_dispatch:

jobs:
Expand All @@ -29,8 +30,7 @@ jobs:
- image: nateateteen/zshpod:full-min
tags: nateateteen/zdartpod:full-min
steps:
- name: Check out the repo
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ name: Publish Docker Image

on:
push:
branches: [ main ]
branches:
- main
paths:
- 'templates/**'
- '.github/workflows/publish_docker.yml'
- 'Dockerfile'
- ".github/workflows/publish_docker.yml"
- "templates/**"
- "Dockerfile"
schedule:
# on the 1st and 15th of every month
- cron: '0 0 1,15 * *'
# on the 1st and 15th of every month
- cron: "0 0 1,15 * *"
workflow_dispatch:

jobs:
Expand All @@ -33,8 +34,7 @@ jobs:
tags: nateateteen/zshpod:full-min
min: yes
steps:
- name: Check out the repo
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ name: Test
# Run only one unique workflow at a time on a pr
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

on:
pull_request:
branches: [ main ]
branches:
- main
paths:
- 'functions/**'
- 'tests/**'
- 'pubspec.yaml'
- ".github/workflows/test.yml"
- "functions/**"
- "tests/**"
- "pubspec.yaml"
workflow_dispatch:

jobs:
Expand Down

0 comments on commit 6ead493

Please sign in to comment.