Skip to content

Commit 6b436d1

Browse files
authored
gha: limit certain steps/jobs to non-forks (#164)
* gha: limit certain steps/jobs to non-forks Signed-off-by: clux <sszynrae@gmail.com> * failing tests Signed-off-by: clux <sszynrae@gmail.com> * put in a quick clux if condition Signed-off-by: clux <sszynrae@gmail.com> --------- Signed-off-by: clux <sszynrae@gmail.com>
1 parent 451d86c commit 6b436d1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/nightly.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737

3838
- name: Login to DockerHub
3939
uses: docker/login-action@v3
40+
if: ${{ github.repository_owner == 'clux' }}
4041
with:
4142
username: clux
4243
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -97,6 +98,7 @@ jobs:
9798
9899
- name: Tag and push
99100
shell: bash
101+
if: ${{ github.repository_owner == 'clux' }}
100102
run: |
101103
RUST_DATE=$(cat /tmp/tags/rust-date)
102104
RUST_CHANNEL=$(cat /tmp/tags/rust-channel)
@@ -118,6 +120,7 @@ jobs:
118120

119121
merge:
120122
runs-on: ubuntu-latest
123+
if: github.repository_owner == 'clux'
121124
needs:
122125
- build
123126
steps:

.github/workflows/stable.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858

5959
- name: Login to DockerHub
6060
uses: docker/login-action@v3
61+
if: ${{ github.repository_owner == 'clux' }}
6162
with:
6263
username: clux
6364
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -112,6 +113,7 @@ jobs:
112113
echo $RUST_VER > /tmp/tags/rust-ver
113114
114115
- name: Tag and push
116+
if: ${{ github.repository_owner == 'clux' }}
115117
shell: bash
116118
run: |
117119
RUST_DATE=$(cat /tmp/tags/rust-date)
@@ -125,6 +127,7 @@ jobs:
125127
126128
# TODO: want to do this, but need digest, which might not be trivial to get outside build-push-action
127129
# - name: Attest docker.io
130+
# if: ${{ github.repository_owner == 'clux' }}
128131
# uses: actions/attest-build-provenance@v2.3.0
129132
# with:
130133
# subject-name: docker.io/${{ env.REGISTRY_IMAGE }}
@@ -143,6 +146,7 @@ jobs:
143146
merge:
144147
name: 'Stable merge'
145148
runs-on: ubuntu-latest
149+
if: github.repository_owner == 'clux'
146150
needs:
147151
- build
148152
steps:

0 commit comments

Comments
 (0)