Skip to content

Commit b686be7

Browse files
authored
Merge pull request #215 from endlessm/only-main-pushes-bst-artifacts
CI: Only main branch pushes bst artifacts to Endless cache server
2 parents 9549e70 + 8949bcd commit b686be7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ jobs:
6363
echo "${ENDLESSCLIENT_CA_CHAIN}" >> client.crt
6464
echo "${ENDLESSCLIENT_KEY}" > client.key
6565
chmod 600 client.key
66+
if [ "${{ github.ref_name }}" == "main" ]; then
67+
PUSH_ARTIFACTS="true"
68+
else
69+
PUSH_ARTIFACTS="false"
70+
fi
6671
mkdir -p ~/.config
6772
cat > ~/.config/buildstream.conf << EOF
6873
# BuildStream user configuration
@@ -89,7 +94,7 @@ jobs:
8994
artifacts:
9095
servers:
9196
- url: https://bstcache.endlessos.org
92-
push: true
97+
push: ${PUSH_ARTIFACTS}
9398
auth:
9499
client-cert: $(pwd)/client.crt
95100
client-key: $(pwd)/client.key

0 commit comments

Comments
 (0)