Skip to content

Commit

Permalink
reset sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
yhtang committed Oct 10, 2023
1 parent 6882265 commit 4a85459
Showing 1 changed file with 34 additions and 20 deletions.
54 changes: 34 additions & 20 deletions .github/workflows/_sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,40 @@ name: "~Sandbox"

on:
workflow_dispatch:
push:

permissions:
contents: read # to fetch code
actions: write # to cancel previous workflows
packages: write # to upload container

jobs:
sandbox:
runs-on: ubuntu-22.04
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Print usage
run: |
cat << EOF
This is an empty workflow file located in the main branch of your
repository. It serves as a testing ground for new GitHub Actions on
development branches before merging them to the main branch. By
defining and overloading this workflow on your development branch,
you can test new actions without affecting your main branch, ensuring
a smooth integration process once the changes are ready to be merged.
build:
strategy:
fail-fast: false
matrix:
BASE_IMAGE:
- 'nvidia/cuda:12.2.0-devel-ubuntu22.04'
- 'nvidia/cuda:12.1.1-devel-ubuntu22.04'
- 'nvidia/cuda:12.2.0-devel-ubuntu20.04'
- 'nvidia/cuda:12.1.1-devel-ubuntu20.04'
uses: ./.github/workflows/_build_base.yaml
with:
BUILD_DATE: ${{ needs.metadata.outputs.BUILD_DATE }}
BASE_IMAGE: ${{ matrix.BASE_IMAGE }}
secrets: inherit
Usage:
1. In your development branch, modify the sandbox.yml workflow file
to include the new actions you want to test. Make sure to commit
the changes to the development branch.
2. Navigate to the 'Actions' tab in your repository, select the
'~Sandbox' workflow, and choose your development branch from the
branch dropdown menu. Click on 'Run workflow' to trigger the
workflow on your development branch.
3. Once you have tested and verified the new actions in the Sandbox
workflow, you can incorporate them into your main workflow(s) and
merge the development branch into the main branch. Remember to
revert the changes to the sandbox.yml file in the main branch to
keep it empty for future testing.
EOF

0 comments on commit 4a85459

Please sign in to comment.