Skip to content

Commit 34a249d

Browse files
KevinYakarfacebook-github-bot
authored andcommitted
Fix actions jobs permission error (#627)
Summary: Actions jobs suddenly started having permission errors. Build would succeed and change permissions of repo folder, so package step would fail. This runs the package step from within the docker container so that it can have proper permissions to package build artifacts. Differential Revision: D86137814
1 parent 6ca125f commit 34a249d

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

.github/workflows/platform-services.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,29 @@ jobs:
3737
- name: Package FBOSS binaries and library dependencies
3838
run: >
3939
sudo
40-
./fboss/oss/scripts/package-fboss.py
41-
--scratch-path
42-
${{ github.workspace }}/build-output
40+
docker
41+
run
42+
--replace
43+
-v
44+
${{ github.workspace }}:/var/FBOSS/fboss:z
45+
-v
46+
${{ github.workspace }}/build-output:/var/FBOSS/tmp_bld_dir:z
47+
--cap-add=CAP_AUDIT_WRITE
48+
--name
49+
FBOSS_BUILD_CONTAINER
50+
fboss_image:latest
51+
bash
52+
/var/FBOSS/fboss/fboss/oss/scripts/package-fboss.py
53+
--copy-root-libs
54+
--scratch-path=/var/FBOSS/tmp_bld_dir
4355
--compress
56+
- name: Restore Repo Permissions
57+
run: >
58+
sudo
59+
chmod
60+
-R
61+
a+rwx
62+
${{ github.workspace }}
4463
- name: Upload build artifacts
4564
uses: actions/upload-artifact@v4
4665
with:

0 commit comments

Comments
 (0)