Skip to content

Commit

Permalink
gets build id from github
Browse files Browse the repository at this point in the history
  • Loading branch information
reederc42 committed Apr 2, 2024
1 parent 3edcdda commit a133f12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 21.7.1

Expand Down Expand Up @@ -61,6 +61,9 @@ jobs:

runs-on: self-hosted

env:
BUILD_ID: ${{ env.GITHUB_JOB}}-${{ env.GITHUB_RUN_ID }}

container:
image: rust:1.77.0
volumes:
Expand All @@ -71,14 +74,12 @@ jobs:

- name: Install Docker CLI
run: |
# Add Docker's official GPG key:
apt-get update
apt-get install ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
Expand All @@ -88,4 +89,4 @@ jobs:
apt-get install -y docker-ce-cli
- name: Run CI
run: cargo run --bin ci -- build_images
run: cargo run --bin ci -- --all
2 changes: 1 addition & 1 deletion ci/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn cmd(args: Cli) {
return;
}

let context = Context { id: "12345" };
let context = Context { id: &std::env::var("BUILD_ID").unwrap() };
let config = Config {
runner: Box::new(Docker{}),
builder: Box::new(Docker{}),
Expand Down

0 comments on commit a133f12

Please sign in to comment.