-
-
Notifications
You must be signed in to change notification settings - Fork 153
Add demo workflow #872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add demo workflow #872
Changes from 155 commits
e0d4b39
75ae8d8
69cb6f0
9e0777a
9062468
2600a6f
2bbedb9
8a2c86e
63c62ca
1e55e9d
1fe7ffa
e838a8a
a80687a
1df005f
806317c
d27fceb
6b30d09
1471ae2
e77df1d
08673a8
a529cea
3031aa0
4f486b1
ef49fc9
09d0558
e0b4781
e1f5109
65608d2
c22cfb8
62a9a70
957aad4
3e92700
97ff562
6f1ce5b
4d84db3
f9d23b3
6cafabf
df2782a
07390f8
cb688d9
bddcb50
513c8e2
6c63877
81eb5ee
aa6599d
2047d8e
d859b4b
f161810
3d15df5
b868732
880c3e0
a1e2006
3195b0a
73a8c1b
67e5fff
5793749
1339e56
0ab6e38
3a0dccd
dedf76c
ce2bff7
bd5cafd
1856da7
33956c4
e7c8db4
d9245a4
dc6a905
f285b78
1dfde36
e2b8df7
729d283
7f1243a
14b38cf
2f932e3
100917d
ad6817f
d307e71
1879d87
de8ca40
7e23dd1
3c08575
e1031b2
203fbaf
1bd1584
96cfb63
ac16b12
1f92a8d
17ae449
615f847
78edd0c
83fcd04
d390e67
c04072c
8928fac
801f7b6
c6665c0
11795f4
14d310f
b82d65c
e969089
684b6fb
5f47cfc
d42fea5
7721fc7
84f4b76
575ad66
2a70a4d
7264ee4
0d02cb3
da46ff4
e3ba3ef
e95f61d
24049c6
2d5620b
cbf10fa
8f1a4c8
4c779f3
d292ec0
b5dc5d5
a030512
46aa861
96ff9a6
f5dd434
3824bf5
b2cf83f
40122a9
3f910fe
d75e637
bbce73a
a6c21c2
35f7c7f
a415ef0
9711a55
a9944b8
9ddbfdd
1a716c8
8f20f91
0c47963
f7038ff
157844b
6abb49b
3d35edf
e61fc8d
4201555
840284f
5fda476
63d9b9e
f4ac942
868569a
dc241ce
85cf37c
ff9e0ee
23c538c
aa63caf
afea056
98fb4d3
dd42afa
cb337cd
1015f73
837a22c
bfff424
c902286
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,297 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Demo | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| types: [labeled, opened, synchronize] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ".github/workflows/demo.yml" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
osterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id-token: write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull-requests: write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TERM: "xterm-256color" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| COLORTERM: "truecolor" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| LANG: "en_US.UTF-8" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ATMOS_LOGS_LEVEL: "Info" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TERRAFORM_VERSION: "1.9.7" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| prepare: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Get Atmos version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: get-version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VERSION=$(curl -s https://api.github.com/repos/cloudposse/atmos/releases/latest | jq -r .tag_name) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
osterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| outputs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| version: ${{ steps.get-version.outputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| screengrabs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| needs: [prepare] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sudo apt-get install -y aha util-linux make jq bat ttyd | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sudo ln -s /usr/bin/batcat /usr/bin/bat | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
osterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Set Git Preferences for windows | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git config --global core.autocrlf false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git config --global core.eol lf | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install Atmos | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: jaxxstorm/action-install-gh-release@v2.10.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| repo: cloudposse/atmos | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tag: ${{ needs.prepare.outputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chmod: 0755 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extension-matching: disable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rename-to: atmos | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: hashicorp/setup-terraform@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| terraform_version: ${{ env.TERRAFORM_VERSION }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| terraform_wrapper: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Run make build-all install | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| make -C demo/screengrabs build-all install | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git add -A | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git status | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
osterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Create or update PR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: peter-evans/create-pull-request@v7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branch: "chore/update-build-screengrabs-for-${{ needs.prepare.outputs.version }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| title: "Update screengrabs for ${{ needs.prepare.outputs.version }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| delete-branch: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sign-commits: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| commit-message: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chore: update screengrabs for ${{ needs.prepare.outputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| body: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This PR updates the screengrabs for Atmos version ${{ needs.prepare.outputs.version }}. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| base: main | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| labels: "no-release" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| vhs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| needs: [prepare] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-24.04 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #runs-on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - runs-on=${{ github.run_id }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - runner=large | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # If VHS takes longer than 20 minutes, it indicate typically that VHS has hung | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeout-minutes: 60 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| environment: demo | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AWS_REGION: us-east-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Setup tmate session | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: mxschmitt/action-tmate@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| detached: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| limit-access-to-actor: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Determine environment-specific settings | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Set Environment Variables | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: set-env | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ "${{ github.event_name }}" == "release" ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "IAM_ROLE_ARN=arn:aws:iam::557075604627:role/cplive-plat-ue2-prod-atmos-docs-gha" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "IAM_ROLE_SESSION_NAME=cloudposse-atmos-ci-deploy-release" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "S3_BUCKET_NAME=cplive-plat-ue2-prod-atmos-docs-origin" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "S3_PATH=assets" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "BASE_URL=https://atmos.tools/assets" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| elif [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "IAM_ROLE_ARN=arn:aws:iam::068007702576:role/cplive-plat-ue2-dev-atmos-docs-gha" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "IAM_ROLE_SESSION_NAME=cloudposse-atmos-ci-deploy-${{ github.run_id }}" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "S3_BUCKET_NAME=cplive-plat-ue2-dev-atmos-docs-origin" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "S3_PATH=pr-${{ github.event.pull_request.number }}/assets" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "BASE_URL=https://pr-${{ github.event.pull_request.number }}.atmos-docs.ue2.dev.plat.cloudposse.org/assets" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # https://github.com/marketplace/actions/configure-aws-credentials-action-for-github-actions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Configure AWS Credentials | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: aws-actions/configure-aws-credentials@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| aws-region: ${{ env.AWS_REGION }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
osterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| role-to-assume: ${{ env.IAM_ROLE_ARN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| role-session-name: ${{ env.IAM_ROLE_SESSION_NAME }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Test AWS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| aws sts get-caller-identity | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
osterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/create-github-app-token@v1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: github-app | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app-id: ${{ vars.BOT_GITHUB_APP_ID }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private-key: ${{ secrets.BOT_GITHUB_APP_PRIVATE_KEY }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| owner: cloudposse-corp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| repositories: assets | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Checkout cloudposse-corp/assets | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| repository: cloudposse-corp/assets | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| token: ${{ steps.github-app.outputs.token }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| path: assets | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install audio track | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cp assets/artlist/background-1.mp3 demo/recordings/background.mp3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Set Swap Space | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: pierotofy/set-swap-space@0404882bc4666c0ff2f6fd8b3d32af69a730183c | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| swap-size-gb: 15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: hashicorp/setup-terraform@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| terraform_version: ${{ env.TERRAFORM_VERSION }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| terraform_wrapper: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install Atmos | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: jaxxstorm/action-install-gh-release@v2.10.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| repo: cloudposse/atmos | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tag: ${{ needs.prepare.outputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chmod: 0755 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extension-matching: disable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rename-to: atmos | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install TTYD | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: jaxxstorm/action-install-gh-release@v2.10.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| repo: tsl0922/ttyd | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tag: 1.7.7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chmod: 0755 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| asset-name: ttyd.x86_64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extension-matching: disable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rename-to: ttyd | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install VHS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: jaxxstorm/action-install-gh-release@v2.10.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| repo: charmbracelet/vhs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tag: v0.9.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chmod: 0755 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extension-matching: disable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rename-to: vhs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Test Atmos | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| which atmos | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| atmos version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| atmos --help | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
osterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Prepare variables | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: vars | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VERSION="${{ needs.prepare.outputs.version }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "job_name=${JOB_NAME}" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "branch_name=chore/update-${JOB_NAME}-for-${VERSION}" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
osterman marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+203
to
+204
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Define run: |
JOB_NAME="demo"
…🤖 Prompt for AI Agents (early access) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+107
to
+205
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Improve variable preparation robustness! The variable preparation step needs better error handling and validation. - name: Prepare variables
id: vars
run: |
VERSION="${{ needs.prepare.outputs.version }}"
- JOB_NAME=$(basename "${{ matrix.file }}" | sed 's/.tape$//')
+ if [[ ! -f "${{ matrix.file }}" ]]; then
+ echo "Tape file not found: ${{ matrix.file }}"
+ exit 1
+ fi
+ JOB_NAME=$(basename "${{ matrix.file }}" .tape)
+ if [[ -z "$JOB_NAME" ]]; then
+ echo "Failed to extract job name"
+ exit 1
+ fi
- echo "version=${VERSION}" >> $GITHUB_OUTPUT
- echo "job_name=${JOB_NAME}" >> $GITHUB_OUTPUT
- echo "branch_name=chore/update-${JOB_NAME}-for-${VERSION}" >> $GITHUB_OUTPUT
+ {
+ echo "version=${VERSION}"
+ echo "job_name=${JOB_NAME}"
+ echo "branch_name=chore/update-${JOB_NAME}-for-${VERSION}"
+ } >> "$GITHUB_OUTPUT"📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.4)109-109: shellcheck reported issue in this script: SC2129:style:3:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects (shellcheck) 109-109: shellcheck reported issue in this script: SC2086:info:3:30: Double quote to prevent globbing and word splitting (shellcheck) 109-109: shellcheck reported issue in this script: SC2086:info:4:32: Double quote to prevent globbing and word splitting (shellcheck) 109-109: shellcheck reported issue in this script: SC2086:info:5:63: Double quote to prevent globbing and word splitting (shellcheck)
Comment on lines
+198
to
+205
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undefined JOB_NAME Variable
Comment on lines
+199
to
+205
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Define or derive run: |
JOB_NAME="demo"
echo "job_name=${JOB_NAME}" >> $GITHUB_OUTPUT🤖 Prompt for AI Agents (early access) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #- name: Setup VHS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # uses: charmbracelet/vhs-action@v2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # install-fonts: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Set up FFmpeg (Latest release) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: FedericoCarboni/setup-ffmpeg@v3.1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ffmpeg-version: "release" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| github-token: ${{ secrets.GITHUB_TOKEN }} # Optional: helps prevent rate limit errors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Set up Go | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-go@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Add Go bin to PATH | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: echo "$HOME/go/bin" >> "$GITHUB_PATH" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install font-install | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| go install github.com/Crosse/font-install@latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install Nerd Fonts & Google Fonts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| font-install nerd-font JetBrainsMono \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nerd-font BitstreamVeraSansMono \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nerd-font DejaVuSansMono \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nerd-font FiraCode \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nerd-font Hack \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nerd-font IBMPlexMono \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nerd-font Inconsolata \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nerd-font InconsolataGo \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nerd-font LiberationMono \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nerd-font SourceCodePro \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nerd-font UbuntuMono \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| google-font "Source Code Pro" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| google-font Inconsolata \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| google-font "Noto Sans Mono" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| google-font "Roboto Mono" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| google-font "Ubuntu Mono" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Record screencast | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| working-directory: demo/recordings | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "PATH=$PATH" > /tmp/path.sh | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ffmpeg -version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| go run studio.go build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cp demo/recordings/gif/atmos.gif docs/demo.gif | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git add docs/demo.gif | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Upload Assets to S3 (atmos.tools) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cd demo/recordings | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| aws s3 ls s3://${{ env.S3_BUCKET_NAME }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for ext in mp4 gif; do | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| aws s3 sync $ext/ s3://${{ env.S3_BUCKET_NAME }}/${{ env.S3_PATH }}/${ext}/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| aws s3 ls s3://${{ env.S3_BUCKET_NAME }}/${{ env.S3_PATH }}/${ext}/ --recursive --human-readable --summarize | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
osterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+129
to
+251
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add error handling to VHS recording. The VHS recording step needs proper error handling. - name: Record screencast
run: |
- vhs ${{ matrix.file }}
+ if ! vhs "${{ matrix.file }}"; then
+ echo "Failed to record screencast"
+ exit 1
+ fi📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Create or update PR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: peter-evans/create-pull-request@v7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: auto-commit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branch: ${{ steps.vars.outputs.branch_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sign-commits: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| commit-message: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chore: update ${{ steps.vars.outputs.job_name }} for ${{ steps.vars.outputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| title: Update ${{ steps.vars.outputs.job_name }} for ${{ steps.vars.outputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| body: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This PR updates the demo gif for ${{ steps.vars.outputs.job_name }} with Atmos version ${{ steps.vars.outputs.version }}. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| base: main | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| labels: no-release | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Add Image to Job Summary | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: steps.auto-commit.outputs.pull-request-operation == 'created' || steps.auto-commit.outputs.pull-request-operation == 'updated' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "## Demo GIF" >> $GITHUB_STEP_SUMMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "" >> $GITHUB_STEP_SUMMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
osterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "## Demo Video" >> $GITHUB_STEP_SUMMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "${{ env.BASE_URL }}/mp4/atmos-with-audio.mp4" >> $GITHUB_STEP_SUMMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: No changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: steps.auto-commit.outputs.pull-request-operation == 'none' || steps.auto-commit.outputs.pull-request-operation == 'closed' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "No changes to demo" >> $GITHUB_STEP_SUMMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.