-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 2.11 KB
/
push-build-latest.yaml
File metadata and controls
51 lines (43 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build latest and report to slack
on:
workflow_call:
inputs:
working-directory:
type: string
default: .
required: false
jobs:
pushBuildLatest:
name: "Build latest: ${{github.repository}} ${{github.event.head_commit.message}}"
if: |
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, '[skip platform-test]')
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
# A simple node script that converts secrets to env vars
# Use specific commit SHA to prevent someone stealing that repo
- uses: oNaiPs/secrets-to-env-action@b64e0192bc4bd2ec0682dee8696470d4866577fa
with:
secrets: ${{ toJSON(secrets) }}
- name: Install dependencies
run: npm install
# Repos can still have older version locally but on cloud we enforce uniformity
- name: Enforce latest test tools version
# We don't override beta so we can use it to test branch-specific versions of apify-test-tools
run: |
if ! npm list apify-test-tools | grep -q "apify-test-tools@.*-beta"; then
echo "Didn't find beta version, installing latest apify-test-tools"
npm install apify-test-tools@latest;
else
echo "Beta version of apify-test-tools is installed, we assume this is testing the library so we won't update it to latest"
fi
- name: Build and Test actor build
run: npx apify-test-tools release --push-event-path ${{ github.event_path }} --release-slack-channel "#delivery-public-actors" --report-slack-channel "#notif-${{ github.event.repository.name }}"
- name: Delete old builds
run: npx apify-test-tools delete-old-builds