Skip to content
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

Alex GitHub Action Build, Upload and Comment #71

Merged
merged 226 commits into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
226 commits
Select commit Hold shift + click to select a range
aaeea8e
Setting up Github Actions
sinapsist Dec 22, 2021
8d790c6
checking out the github actions yaml file format and trying to get a …
alexzbusko Dec 28, 2021
09d482b
removed old ID that I was keeping for posterity
alexzbusko Dec 28, 2021
f0dcc39
checking deno fmt command
alexzbusko Dec 28, 2021
18aa29b
added my branch to github actions to make the actions run on push
alexzbusko Dec 28, 2021
80660f5
removing formatting, is no bueno
alexzbusko Dec 28, 2021
82d5abf
turning off linter to see tests in action
alexzbusko Dec 28, 2021
495a2d1
added step to build taqueria
alexzbusko Dec 29, 2021
b917f81
added part of action to check the taqueria version
alexzbusko Dec 29, 2021
54ce426
added separate step for checking version
alexzbusko Dec 29, 2021
0db952d
added step to try and build taqueria SDK
alexzbusko Dec 29, 2021
b7b49e7
moved directory navigation to before setting up node
alexzbusko Dec 29, 2021
5afb5dd
dummy package.json from sdk folder to get past node installation error
alexzbusko Dec 29, 2021
33e5e79
including package-lock.json file
alexzbusko Dec 29, 2021
8d46eaf
trying protocol instead of sdk directories
alexzbusko Dec 29, 2021
80bdd3f
changing wording in step names to protocol
alexzbusko Dec 29, 2021
5ac03b5
trying out SDK build again
alexzbusko Jan 4, 2022
3821449
added in build step after deps install
alexzbusko Jan 4, 2022
dd07b89
adding steps for logging node and npm versions
alexzbusko Jan 4, 2022
236d582
trying to not use cache for node, seeing if this will change up the n…
alexzbusko Jan 4, 2022
e635868
checking if deno is the problem with build system error for top level…
alexzbusko Jan 4, 2022
7eaf9f6
added deno setup for build steps
alexzbusko Jan 4, 2022
539221e
indentation problem
alexzbusko Jan 4, 2022
6d59a54
adding build step for all taqueria to see if it makes hidden things a…
alexzbusko Jan 4, 2022
9c4a387
adding deno setup to builds
alexzbusko Jan 4, 2022
449db1c
changing ubuntu runner version to see if it makes a difference
alexzbusko Jan 5, 2022
7513437
seeing if changing commands will help by specifying output format
alexzbusko Jan 5, 2022
f5d7ed5
moving all steps for build into single step to make use of single wor…
alexzbusko Jan 5, 2022
7ab4eb2
Merge branch 'main' into alex-github-action-init
alexzbusko Jan 5, 2022
0b37c49
moving commands to different run steps
alexzbusko Jan 5, 2022
6a66749
making buid command a multi-line command
alexzbusko Jan 5, 2022
d4775fa
fixing indentation
alexzbusko Jan 5, 2022
62437fe
removed dash
alexzbusko Jan 5, 2022
247ca2b
Merge branch 'phase-0' into alex-github-action-init
alexzbusko Jan 5, 2022
0a00fa8
added step to upload taqueria binary
alexzbusko Jan 5, 2022
e245632
trying to use dynamic path in github actions for binary upload
alexzbusko Jan 5, 2022
9e1bde2
changing back to hard coding directory right now until dynamic soluti…
alexzbusko Jan 5, 2022
832dd20
added section to look into github script for doing things in PRs
alexzbusko Jan 6, 2022
739e950
adding in comment section to PR
alexzbusko Jan 6, 2022
f19de5c
removing secrets token
alexzbusko Jan 6, 2022
d17af8d
downgraded version of github script
alexzbusko Jan 6, 2022
26bc29d
getting info for all context data
alexzbusko Jan 6, 2022
8410209
changing script to run for multiline to see if it works
alexzbusko Jan 6, 2022
cd08c0f
going back to basics on context
alexzbusko Jan 6, 2022
3a8247c
now adding back in actual command for adding comment
alexzbusko Jan 6, 2022
717a659
adding github example to see if it works
alexzbusko Jan 6, 2022
09e3de7
adding in section to try and get all artifacts for a run
alexzbusko Jan 6, 2022
e50d239
trying to get request to work
alexzbusko Jan 6, 2022
faa0853
fixed indentation
alexzbusko Jan 6, 2022
ea43d57
updating github token for request to artifacts API endpoint
alexzbusko Jan 6, 2022
de9a0c2
typo on run number for workflow
alexzbusko Jan 6, 2022
4ed9b9f
adding in step to get context info
alexzbusko Jan 6, 2022
a9d551e
adding step to gather needed info for repo
alexzbusko Jan 6, 2022
a89af0d
trying to get the result and use it in downstream steps
alexzbusko Jan 6, 2022
1850b06
targetting specific info
alexzbusko Jan 6, 2022
a8917ea
adding step to use built in octokit API call for listing workflow art…
alexzbusko Jan 6, 2022
c8f8310
forgot work in command
alexzbusko Jan 6, 2022
abf5d2b
incorrect case wasn't getting the run number
alexzbusko Jan 6, 2022
f1296bf
trying to get artiifacts for whole repo
alexzbusko Jan 6, 2022
98c46e2
trying to get output for both queries on atrifacts
alexzbusko Jan 6, 2022
d234a6a
changed name for getting context info
alexzbusko Jan 6, 2022
c940fa4
trying to target based on repo name and experiment with options
alexzbusko Jan 6, 2022
189c309
using repo.repo
alexzbusko Jan 6, 2022
a225353
changing step order
alexzbusko Jan 6, 2022
7da45e4
updating runNumber to runId
alexzbusko Jan 7, 2022
ee0ca29
updated echo commands to use correct formatting
alexzbusko Jan 7, 2022
ef19f7c
trying to get more results from github script steps
alexzbusko Jan 7, 2022
6e695ed
forgot quotes on the echo for results
alexzbusko Jan 7, 2022
c2d6092
trying with other access token
alexzbusko Jan 7, 2022
94c6670
added sleep to see if artifacts will show up
alexzbusko Jan 7, 2022
867c3f2
commenting out listing artifacts from whole repo
alexzbusko Jan 7, 2022
c7c69b6
splitting building and updating PR into separate jobs
alexzbusko Jan 7, 2022
d7c2595
added in needs clause for update jobs
alexzbusko Jan 7, 2022
7a76f71
added context log to both jobs
alexzbusko Jan 7, 2022
f8b59d9
changing github token to test token to try personal access token for …
alexzbusko Jan 7, 2022
d252831
adding separate file for other workflow to trigger off successful bui…
alexzbusko Jan 7, 2022
7e9551a
removed branch requirement from secondary workflow
alexzbusko Jan 7, 2022
4b8fe3a
Merge branch 'main' into alex-github-action-init
alexzbusko Jan 7, 2022
886596d
changed types to list
alexzbusko Jan 7, 2022
f1a8693
added in requested type for workflow downstream run
alexzbusko Jan 7, 2022
c5170df
removing types from other workflow
alexzbusko Jan 7, 2022
ee1d021
changing name of workflow to see if it shows up in github
alexzbusko Jan 7, 2022
30c7e3b
removing branch specific information
alexzbusko Jan 7, 2022
dd5fd30
added in main branch again
alexzbusko Jan 7, 2022
e0fd1a2
adding in Gino's part for the second URL building step and testing
alexzbusko Jan 10, 2022
0935249
wrong branch name and updated run ID
alexzbusko Jan 10, 2022
88c753e
removing matrixed job for building to see if that affects workflow runs
alexzbusko Jan 10, 2022
f014979
added specific file for uploading taq binary
alexzbusko Jan 10, 2022
17f2913
renamed PR update file
alexzbusko Jan 10, 2022
45d53ab
adding in if condition on PR update
alexzbusko Jan 10, 2022
2135a8d
adding in step to test out link generation
alexzbusko Jan 10, 2022
89e78cf
trying with current runID
alexzbusko Jan 10, 2022
92624a1
getting runId from job and ensuring it is in the right output
alexzbusko Jan 10, 2022
598fe11
changed around calling condition to make sure that upload workflow runs
alexzbusko Jan 10, 2022
805940b
removed starting conditions for unused workflow files and changed tar…
alexzbusko Jan 10, 2022
90432e6
updated PR update job to use run ID from upload job
alexzbusko Jan 10, 2022
5523edd
updated called workflow to use commit reference
alexzbusko Jan 10, 2022
256c640
trying to get dummy value through and updated casing typo in export f…
alexzbusko Jan 10, 2022
646ab30
fixed renaming type
alexzbusko Jan 10, 2022
e9c9cd5
trying to get output from correct ID with correct variable name
alexzbusko Jan 10, 2022
cf8233f
updating commit hash for dependant workflow
alexzbusko Jan 10, 2022
dd5d730
adding in getting info job to see what is in the context
alexzbusko Jan 10, 2022
f7fd187
adding in runner for getting info job
alexzbusko Jan 10, 2022
0953c07
making called workflow depend on getting info
alexzbusko Jan 10, 2022
404b359
updating called workflow to use branch name and adding in verificatio…
alexzbusko Jan 10, 2022
2af7b46
forgot to add run step for sleep command
alexzbusko Jan 10, 2022
5e73b74
added in step for checking the context result is showing correctly
alexzbusko Jan 10, 2022
5de0c3e
added output for job in upload job
alexzbusko Jan 10, 2022
190e09d
indentation error on checking final output
alexzbusko Jan 10, 2022
c459e35
made retrieving the ID more concise
alexzbusko Jan 10, 2022
8704153
adding in step to get artifact
alexzbusko Jan 10, 2022
270d6dc
made changes to make taqueria yml files match testing versions for PR
alexzbusko Jan 11, 2022
cae6b74
removed main.yml for now since it is not used
alexzbusko Jan 11, 2022
54916d9
Setting up Github Actions
sinapsist Dec 22, 2021
1eafecd
checking out the github actions yaml file format and trying to get a …
alexzbusko Dec 28, 2021
c888aa7
removed old ID that I was keeping for posterity
alexzbusko Dec 28, 2021
b629bdc
checking deno fmt command
alexzbusko Dec 28, 2021
d7e9a56
added my branch to github actions to make the actions run on push
alexzbusko Dec 28, 2021
37cebc9
removing formatting, is no bueno
alexzbusko Dec 28, 2021
36b3318
turning off linter to see tests in action
alexzbusko Dec 28, 2021
9c17355
added step to build taqueria
alexzbusko Dec 29, 2021
9cf5501
added part of action to check the taqueria version
alexzbusko Dec 29, 2021
d06e54d
added separate step for checking version
alexzbusko Dec 29, 2021
368cb8d
added step to try and build taqueria SDK
alexzbusko Dec 29, 2021
28e224f
moved directory navigation to before setting up node
alexzbusko Dec 29, 2021
d2a0c56
dummy package.json from sdk folder to get past node installation error
alexzbusko Dec 29, 2021
2b864fd
including package-lock.json file
alexzbusko Dec 29, 2021
53bf9a8
trying protocol instead of sdk directories
alexzbusko Dec 29, 2021
de6caf3
changing wording in step names to protocol
alexzbusko Dec 29, 2021
d25c8d6
trying out SDK build again
alexzbusko Jan 4, 2022
922ee81
added in build step after deps install
alexzbusko Jan 4, 2022
9a238ab
adding steps for logging node and npm versions
alexzbusko Jan 4, 2022
2860baa
trying to not use cache for node, seeing if this will change up the n…
alexzbusko Jan 4, 2022
45cd41b
checking if deno is the problem with build system error for top level…
alexzbusko Jan 4, 2022
b018474
added deno setup for build steps
alexzbusko Jan 4, 2022
f5f5e62
indentation problem
alexzbusko Jan 4, 2022
68af77c
adding build step for all taqueria to see if it makes hidden things a…
alexzbusko Jan 4, 2022
bdd31a2
adding deno setup to builds
alexzbusko Jan 4, 2022
bb3775a
changing ubuntu runner version to see if it makes a difference
alexzbusko Jan 5, 2022
dde8403
seeing if changing commands will help by specifying output format
alexzbusko Jan 5, 2022
084e54d
moving all steps for build into single step to make use of single wor…
alexzbusko Jan 5, 2022
e0c50e0
moving commands to different run steps
alexzbusko Jan 5, 2022
b5055de
making buid command a multi-line command
alexzbusko Jan 5, 2022
7a62e9d
fixing indentation
alexzbusko Jan 5, 2022
7342001
removed dash
alexzbusko Jan 5, 2022
7007927
added step to upload taqueria binary
alexzbusko Jan 5, 2022
c4ddbb9
trying to use dynamic path in github actions for binary upload
alexzbusko Jan 5, 2022
79c8111
changing back to hard coding directory right now until dynamic soluti…
alexzbusko Jan 5, 2022
2ed91f9
added section to look into github script for doing things in PRs
alexzbusko Jan 6, 2022
78e4458
adding in comment section to PR
alexzbusko Jan 6, 2022
5c2d437
removing secrets token
alexzbusko Jan 6, 2022
caba831
downgraded version of github script
alexzbusko Jan 6, 2022
2669ff1
getting info for all context data
alexzbusko Jan 6, 2022
861a0a3
changing script to run for multiline to see if it works
alexzbusko Jan 6, 2022
211fb3a
going back to basics on context
alexzbusko Jan 6, 2022
772ef76
now adding back in actual command for adding comment
alexzbusko Jan 6, 2022
c54334d
adding github example to see if it works
alexzbusko Jan 6, 2022
237a238
adding in section to try and get all artifacts for a run
alexzbusko Jan 6, 2022
6d8327b
trying to get request to work
alexzbusko Jan 6, 2022
e3366fd
fixed indentation
alexzbusko Jan 6, 2022
38d5a26
updating github token for request to artifacts API endpoint
alexzbusko Jan 6, 2022
2eecbae
typo on run number for workflow
alexzbusko Jan 6, 2022
1596c48
adding in step to get context info
alexzbusko Jan 6, 2022
387c159
adding step to gather needed info for repo
alexzbusko Jan 6, 2022
8cb7780
trying to get the result and use it in downstream steps
alexzbusko Jan 6, 2022
ff91882
targetting specific info
alexzbusko Jan 6, 2022
fbf8f8b
adding step to use built in octokit API call for listing workflow art…
alexzbusko Jan 6, 2022
1b73a2f
forgot work in command
alexzbusko Jan 6, 2022
3d9cb8c
incorrect case wasn't getting the run number
alexzbusko Jan 6, 2022
7ca1db9
trying to get artiifacts for whole repo
alexzbusko Jan 6, 2022
af135df
trying to get output for both queries on atrifacts
alexzbusko Jan 6, 2022
11b55b8
changed name for getting context info
alexzbusko Jan 6, 2022
dfda6d2
trying to target based on repo name and experiment with options
alexzbusko Jan 6, 2022
83be6ae
using repo.repo
alexzbusko Jan 6, 2022
0968938
changing step order
alexzbusko Jan 6, 2022
e2a6b7b
updating runNumber to runId
alexzbusko Jan 7, 2022
cbcb97c
updated echo commands to use correct formatting
alexzbusko Jan 7, 2022
e3023fb
trying to get more results from github script steps
alexzbusko Jan 7, 2022
c4e09be
forgot quotes on the echo for results
alexzbusko Jan 7, 2022
fec08a9
trying with other access token
alexzbusko Jan 7, 2022
fa10926
added sleep to see if artifacts will show up
alexzbusko Jan 7, 2022
3b3831c
commenting out listing artifacts from whole repo
alexzbusko Jan 7, 2022
f95c07b
splitting building and updating PR into separate jobs
alexzbusko Jan 7, 2022
3676da7
added in needs clause for update jobs
alexzbusko Jan 7, 2022
5977940
added context log to both jobs
alexzbusko Jan 7, 2022
aae5955
changing github token to test token to try personal access token for …
alexzbusko Jan 7, 2022
cd88b4b
adding separate file for other workflow to trigger off successful bui…
alexzbusko Jan 7, 2022
2ec9602
removed branch requirement from secondary workflow
alexzbusko Jan 7, 2022
2b7d94a
changed types to list
alexzbusko Jan 7, 2022
b835a16
added in requested type for workflow downstream run
alexzbusko Jan 7, 2022
de8c8f9
removing types from other workflow
alexzbusko Jan 7, 2022
2c47546
changing name of workflow to see if it shows up in github
alexzbusko Jan 7, 2022
cf03e41
removing branch specific information
alexzbusko Jan 7, 2022
1ebf0df
added in main branch again
alexzbusko Jan 7, 2022
f3de7dc
adding in Gino's part for the second URL building step and testing
alexzbusko Jan 10, 2022
598a566
wrong branch name and updated run ID
alexzbusko Jan 10, 2022
f0d4c17
removing matrixed job for building to see if that affects workflow runs
alexzbusko Jan 10, 2022
b740862
added specific file for uploading taq binary
alexzbusko Jan 10, 2022
cdd10a1
renamed PR update file
alexzbusko Jan 10, 2022
3892fc7
adding in if condition on PR update
alexzbusko Jan 10, 2022
d3ae857
adding in step to test out link generation
alexzbusko Jan 10, 2022
aff4def
trying with current runID
alexzbusko Jan 10, 2022
ef4be7b
getting runId from job and ensuring it is in the right output
alexzbusko Jan 10, 2022
f9d6de6
changed around calling condition to make sure that upload workflow runs
alexzbusko Jan 10, 2022
472fbf9
removed starting conditions for unused workflow files and changed tar…
alexzbusko Jan 10, 2022
4500aff
updated PR update job to use run ID from upload job
alexzbusko Jan 10, 2022
f189039
updated called workflow to use commit reference
alexzbusko Jan 10, 2022
c6b3a93
trying to get dummy value through and updated casing typo in export f…
alexzbusko Jan 10, 2022
c2ef78e
fixed renaming type
alexzbusko Jan 10, 2022
a8ac96c
trying to get output from correct ID with correct variable name
alexzbusko Jan 10, 2022
2dad544
updating commit hash for dependant workflow
alexzbusko Jan 10, 2022
25494fd
adding in getting info job to see what is in the context
alexzbusko Jan 10, 2022
85bb734
adding in runner for getting info job
alexzbusko Jan 10, 2022
b8eb64a
making called workflow depend on getting info
alexzbusko Jan 10, 2022
b8275c2
updating called workflow to use branch name and adding in verificatio…
alexzbusko Jan 10, 2022
ec9eb56
forgot to add run step for sleep command
alexzbusko Jan 10, 2022
7036bdb
added in step for checking the context result is showing correctly
alexzbusko Jan 10, 2022
07bc68a
added output for job in upload job
alexzbusko Jan 10, 2022
c39fd15
indentation error on checking final output
alexzbusko Jan 10, 2022
8d7fc4c
made retrieving the ID more concise
alexzbusko Jan 10, 2022
340c752
adding in step to get artifact
alexzbusko Jan 10, 2022
7eec94f
made changes to make taqueria yml files match testing versions for PR
alexzbusko Jan 11, 2022
b53200a
removed main.yml for now since it is not used
alexzbusko Jan 11, 2022
8066d6d
Merge branch 'alex-github-action-pr-update' of github.com:ecadlabs/ta…
alexzbusko Jan 11, 2022
19a44a7
removing dummy package.json files
alexzbusko Jan 11, 2022
17cb897
updating upload workflow to only run on PRs to the main branch and to…
alexzbusko Jan 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions .github/workflows/PR-update.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/pr-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: pr-update

on:
# WARNING: When working with workflow_run workflows they will only ever execute
# what is present on the default branch in the repo. Make all the changes you
# want here and they will not change how your PR job will run. If you want to
# make changes to this it is best to update on the main branch itself.
workflow_run:
workflows: ["upload-taqueria"]
types: [completed]

jobs:
update_PR:
runs-on: ubuntu-latest
steps:
- name: Create Artifact Download
uses: actions/github-script@v5
id: createArtifact
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const {owner, repo} = context.repo
const run_id = context.payload.workflow_run.id
const check_suite_id = context.payload.workflow_run.check_suite_id

const artifacts = await github.paginate(
github.rest.actions.listWorkflowRunArtifacts, {owner, repo, run_id})

let body = `Download the latest artifact(s) for this pull request here:\n`

for (const artifact of artifacts) {
body += `\n* [${artifact.name}.zip](https://github.com/${owner}/${repo}/suites/${check_suite_id}/artifacts/${artifact.id})`
}

return body

- name: Comment Artifact to PR
uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.payload.workflow_run.pull_requests[0].number,
owner: context.repo.owner,
repo: context.repo.repo,
body: ${{ steps.createArtifact.outputs.result }}
})
29 changes: 29 additions & 0 deletions .github/workflows/upload-taqueria.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: upload-taqueria

on:
pull_request:
branches:
- main

jobs:
build_taqueria_and_upload:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v2

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: "^1.0.0"

- name: Build taqueria
run: ./bin/build.sh

- name: Upload Taqueria Binary
uses: actions/upload-artifact@v2
if: success()
with:
name: taqueria
path: ${GITHUB_WORKSPACE}/taqueria
retention-days: 1