Skip to content

Commit 8949bcd

Browse files
committed
CI: Only main branch pushes bst artifacts to Endless cache server
Pushing artifacts takes time. Pushing developing bst artifacts to cache server bothers other development, too. So, make it only main branch push bst artifacts to Endless cache server.
1 parent 9549e70 commit 8949bcd

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)