Skip to content

Commit 2ec6433

Browse files
committed
feat: shared item should be action not workflow
1 parent cf3b20b commit 2ec6433

16 files changed

+50
-31
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Shared Checkout'
2+
description: 'Checkout repository with common configuration'
3+
4+
inputs:
5+
token:
6+
description: 'GitHub token'
7+
required: false
8+
default: ${{ github.token }}
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
16+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
17+
fetch-depth: 0
18+
fetch-tags: true
19+
token: ${{ inputs.token }}

.github/workflows/ami-release-nix-single.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
timeout-minutes: 150
2424

2525
steps:
26-
- uses: ./.github/workflows/shared-checkout.yml
26+
- uses: ./.github/actions/shared-checkout
2727

2828
- name: Get current branch SHA
2929
id: get_sha

.github/workflows/ami-release-nix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
outputs:
2222
postgres_versions: ${{ steps.set-versions.outputs.postgres_versions }}
2323
steps:
24-
- uses: ./.github/workflows/shared-checkout.yml
24+
- uses: ./.github/actions/shared-checkout
2525

2626
- uses: DeterminateSystems/nix-installer-action@main
2727

@@ -46,7 +46,7 @@ jobs:
4646
timeout-minutes: 150
4747

4848
steps:
49-
- uses: ./.github/workflows/shared-checkout.yml
49+
- uses: ./.github/actions/shared-checkout
5050

5151
- uses: DeterminateSystems/nix-installer-action@main
5252

.github/workflows/check-shellscripts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: ./.github/workflows/shared-checkout.yml
17+
- uses: ./.github/actions/shared-checkout
1818

1919
- name: Run ShellCheck
2020
uses: ludeeus/action-shellcheck@master

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
timeout-minutes: 5
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: ./.github/workflows/shared-checkout.yml
14+
- uses: ./.github/actions/shared-checkout
1515

1616
- name: Load postgres_release values
1717
id: load_postgres_release

.github/workflows/dockerhub-release-matrix.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix_config: ${{ steps.set-matrix.outputs.matrix_config }}
2222
steps:
2323
- uses: DeterminateSystems/nix-installer-action@main
24-
- uses: ./.github/workflows/shared-checkout.yml
24+
- uses: ./.github/actions/shared-checkout
2525
- name: Generate build matrix
2626
id: set-matrix
2727
run: |
@@ -52,7 +52,7 @@ jobs:
5252
outputs:
5353
build_args: ${{ steps.args.outputs.result }}
5454
steps:
55-
- uses: ./.github/workflows/shared-checkout.yml
55+
- uses: ./.github/actions/shared-checkout
5656
- uses: DeterminateSystems/nix-installer-action@main
5757
- name: Set PostgreSQL version environment variable
5858
run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.version }}" >> $GITHUB_ENV
@@ -76,7 +76,7 @@ jobs:
7676
runs-on: ${{ matrix.arch == 'amd64' && 'ubuntu-latest' || 'arm-runner' }}
7777
timeout-minutes: 180
7878
steps:
79-
- uses: ./.github/workflows/shared-checkout.yml
79+
- uses: ./.github/actions/shared-checkout
8080
- uses: DeterminateSystems/nix-installer-action@main
8181
- run: docker context create builders
8282
- uses: docker/setup-buildx-action@v3
@@ -131,7 +131,7 @@ jobs:
131131
include: ${{ fromJson(needs.prepare.outputs.matrix_config).include }}
132132
runs-on: ubuntu-latest
133133
steps:
134-
- uses: ./.github/workflows/shared-checkout.yml
134+
- uses: ./.github/actions/shared-checkout
135135
- uses: DeterminateSystems/nix-installer-action@main
136136
- uses: docker/setup-buildx-action@v3
137137
- uses: docker/login-action@v2
@@ -174,7 +174,7 @@ jobs:
174174
needs: [prepare, merge_manifest]
175175
runs-on: ubuntu-latest
176176
steps:
177-
- uses: ./.github/workflows/shared-checkout.yml
177+
- uses: ./.github/actions/shared-checkout
178178
- uses: DeterminateSystems/nix-installer-action@main
179179

180180
- name: Debug Input from Prepare

.github/workflows/manual-docker-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
matrix_config: ${{ steps.set-matrix.outputs.matrix_config }}
1919
steps:
2020
- uses: DeterminateSystems/nix-installer-action@main
21-
- uses: ./.github/workflows/shared-checkout.yml
21+
- uses: ./.github/actions/shared-checkout
2222
- name: Generate build matrix
2323
id: set-matrix
2424
run: |
@@ -49,7 +49,7 @@ jobs:
4949
outputs:
5050
build_args: ${{ steps.args.outputs.result }}
5151
steps:
52-
- uses: ./.github/workflows/shared-checkout.yml
52+
- uses: ./.github/actions/shared-checkout
5353
- uses: DeterminateSystems/nix-installer-action@main
5454
- name: Set PostgreSQL version environment variable
5555
run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.version }}" >> $GITHUB_ENV
@@ -73,7 +73,7 @@ jobs:
7373
runs-on: ${{ matrix.arch == 'amd64' && 'ubuntu-latest' || 'arm-runner' }}
7474
timeout-minutes: 180
7575
steps:
76-
- uses: ./.github/workflows/shared-checkout.yml
76+
- uses: ./.github/actions/shared-checkout
7777
- uses: DeterminateSystems/nix-installer-action@main
7878
- run: docker context create builders
7979
- uses: docker/setup-buildx-action@v3
@@ -140,7 +140,7 @@ jobs:
140140
include: ${{ fromJson(needs.prepare.outputs.matrix_config).include }}
141141
runs-on: ubuntu-latest
142142
steps:
143-
- uses: ./.github/workflows/shared-checkout.yml
143+
- uses: ./.github/actions/shared-checkout
144144
- uses: DeterminateSystems/nix-installer-action@main
145145
- uses: docker/setup-buildx-action@v3
146146
- uses: docker/login-action@v2
@@ -183,7 +183,7 @@ jobs:
183183
needs: [prepare, merge_manifest]
184184
runs-on: ubuntu-latest
185185
steps:
186-
- uses: ./.github/workflows/shared-checkout.yml
186+
- uses: ./.github/actions/shared-checkout
187187
- uses: DeterminateSystems/nix-installer-action@main
188188

189189
- name: Debug Input from Prepare

.github/workflows/mirror-postgrest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
outputs:
1818
postgrest_release: ${{ steps.args.outputs.result }}
1919
steps:
20-
- uses: ./.github/workflows/shared-checkout.yml
20+
- uses: ./.github/actions/shared-checkout
2121

2222
- id: args
2323
uses: mikefarah/yq@master

.github/workflows/nix-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
timeout-minutes: 180
2929
steps:
3030
- name: Check out code
31-
uses: ./.github/workflows/shared-checkout.yml
31+
uses: ./.github/actions/shared-checkout
3232

3333
- name: aws-creds
3434
uses: aws-actions/configure-aws-credentials@v4

.github/workflows/publish-migrations-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
env:
2222
GITHUB_REF: ${{ github.ref }}
2323

24-
- uses: ./.github/workflows/shared-checkout.yml
24+
- uses: ./.github/actions/shared-checkout
2525

2626
- name: Merging migration files
2727
run: cat $(ls -1) > ../migration-output.sql

0 commit comments

Comments
 (0)