[pull] master from magma:master #2439
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2022 The Magma Authors. | |
# | |
# This source code is licensed under the BSD-style license found in the | |
# LICENSE file in the root directory of this source tree. | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# owner: @magma/approvers-cloud | |
# purpose: Ensure generated files are committed | |
# remediation: https://magma.github.io/magma/docs/next/orc8r/dev_testing | |
name: Orc8r Check Generated Files In Sync | |
on: | |
push: | |
branches: | |
- master | |
- 'v1.*' | |
pull_request: | |
branches: | |
- master | |
- 'v1.*' | |
types: [ opened, reopened, synchronize ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
insync-checkin: | |
name: insync checkin job | |
runs-on: ubuntu-20.04 | |
env: | |
MAGMA_ROOT: "${{ github.workspace }}" | |
steps: | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # [email protected] | |
- uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # [email protected] | |
with: | |
python-version: '3.8.10' | |
- name: Run build.py | |
run: | | |
cd ${MAGMA_ROOT}/orc8r/cloud/docker | |
python3 build.py --generate | |
sudo chown -R $USER $MAGMA_ROOT/* | |
git add . | |
echo GIT_STATUS=$(git status) >> $GITHUB_ENV | |
git status | |
git diff-index --quiet HEAD | |
- name: Notify failure to Slack | |
if: failure() && github.event_name == 'push' | |
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 # [email protected] | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_CI }} | |
SLACK_TITLE: "Github action insync-checkin failed" | |
SLACK_USERNAME: ${{ github.workflow }} | |
SLACK_MESSAGE: ${{ github.event.head_commit.message || github.event.pull_request.title }} | |
SLACK_ICON_EMOJI: ":boom:" | |
SLACK_COLOR: "#FF0000" | |
SLACK_FOOTER: ' ' |