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 56cbb89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 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 @@ -65,20 +65,20 @@ jobs:
image: rust:1.77.0
volumes:
- /var/run/docker.sock
env:
BUILD_ID: ${{ github.job }}-${{ github.run_id }}

steps:
- uses: actions/checkout@v4

- 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 +88,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 56cbb89

Please sign in to comment.