Skip to content

Commit d48fb68

Browse files
committed
Adjust release workflow.
1 parent 753c83a commit d48fb68

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.github/workflows/ami-release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [published]
66

77
jobs:
8-
build-and-ami:
8+
build-ami:
99
runs-on: ubuntu-latest
1010

1111
steps:
@@ -49,6 +49,8 @@ jobs:
4949

5050
- name: Build AMI
5151
run: |
52-
# Use release tag as version
53-
just --justfile packer/justfile make-overlay
54-
just --justfile packer/justfile make-image
52+
cd packer
53+
packer init .
54+
just build
55+
just make-overlay
56+
VERSION=${GITHUB_REF_NAME} just make-image

packer/justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version := "0.1.0"
1+
version := env("VERSION", "0.1.0")
22
vector-version := "0.50.0"
33
overlay-archive := "timeboost-overlay.tar.gz"
44

@@ -12,7 +12,7 @@ format:
1212
packer fmt .
1313

1414
build:
15-
cargo build --release --bin timeboost --target x86_64-unknown-linux-gnu
15+
cargo build --release --bin timeboost
1616

1717
make-overlay:
1818
#!/usr/bin/env bash
@@ -23,7 +23,7 @@ make-overlay:
2323
dir=$(mktemp -d)
2424
cp -R overlay $dir/
2525
mkdir -p $dir/overlay/usr/local/bin
26-
cp target/release/timeboost $dir/overlay/usr/local/bin/timeboost
26+
cp ../target/release/timeboost $dir/overlay/usr/local/bin/timeboost
2727
tar czf {{overlay-archive}} -C $dir/overlay/ .
2828

2929
validate:

packer/timeboost.pkr.hcl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
packer {
22
required_plugins {
33
amazon = {
4-
version = ">= 1.5.0"
4+
version = ">= 1.2.0"
55
source = "github.com/hashicorp/amazon"
66
}
77
}
@@ -42,8 +42,6 @@ source "amazon-ebs" "al2" {
4242
}
4343

4444
ssh_username = "ec2-user"
45-
ssh_keypair_name = "timeboost-eu-central-1"
46-
ssh_private_key_file = "~/.ssh/timeboost-eu-central-1.pem"
4745
}
4846

4947
build {

0 commit comments

Comments
 (0)