Skip to content

Commit

Permalink
Merge pull request #16 from dskiff/dskiff/reformat-ci
Browse files Browse the repository at this point in the history
very minor workflow cleanup
  • Loading branch information
dskiff committed Apr 27, 2024
2 parents bc0f21b + 12995ef commit 10ff8a9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
run: go run . version

- name: Run against local docker daemon
run: go run . build -t "test/repo" "./dist/tko_linux_amd64_v1"
run: |
go run . build \
-l "org.opencontainers.image.revision=${{ github.sha }}" \
-l "org.opencontainers.image.version=dev-${{ github.sha }}" \
-t "test/repo" \
"./dist/tko_linux_amd64_v1"
env:
TARGET_TYPE: LOCAL_DAEMON
TKO_TARGET_TYPE: LOCAL_DAEMON
9 changes: 7 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ jobs:
run: cp ./dist/tko_linux_amd64_v1/tko /usr/local/bin/tko

- name: Publish (latest)
run: tko build -t "ghcr.io/dskiff/tko:latest" -e "/bin/bash" "./dist/tko_linux_amd64_v1"
run: |
tko build \
-l "org.opencontainers.image.revision=${{ github.sha }}" \
-l "org.opencontainers.image.version=dev-${{ github.sha }}" \
-t "ghcr.io/dskiff/tko:latest" \
-e "/bin/bash" \
"./dist/tko_linux_amd64_v1"
env:
TKO_BASE_IMAGE: debian:bookworm-slim@sha256:155280b00ee0133250f7159b567a07d7cd03b1645714c3a7458b2287b0ca83cb
TKO_ADDITIONAL_LABELS: org.opencontainers.image.revision=${{ github.sha }}
GITHUB_TOKEN: ${{ github.token }}
18 changes: 14 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,24 @@ jobs:
run: cp ./dist/tko_linux_amd64_v1/tko /usr/local/bin/tko

- name: Publish (bin)
run: tko build -b "scratch" -t "ghcr.io/dskiff/tko:bin" "./dist/tko_linux_amd64_v1"
run: |
tko build \
-b "scratch" \
-t "ghcr.io/dskiff/tko:bin" \
-l "org.opencontainers.image.revision=${{ github.sha }}" \
-l "org.opencontainers.image.version=${{ github.ref_name }}" \
"./dist/tko_linux_amd64_v1"
env:
TKO_ADDITIONAL_LABELS: org.opencontainers.image.revision=${{ github.sha }},org.opencontainers.image.version=${{ github.ref_name }}
GITHUB_TOKEN: ${{ github.token }}

- name: Publish (version)
run: tko build -t "ghcr.io/dskiff/tko:${{ github.ref_name }}" -e "/bin/bash" "./dist/tko_linux_amd64_v1"
run: |
tko build \
-l "org.opencontainers.image.revision=${{ github.sha }}" \
-l "org.opencontainers.image.version=${{ github.ref_name }}" \
-t "ghcr.io/dskiff/tko:${{ github.ref_name }}" \
-e "/bin/bash" \
"./dist/tko_linux_amd64_v1"
env:
TKO_BASE_IMAGE: debian:bookworm-slim@sha256:155280b00ee0133250f7159b567a07d7cd03b1645714c3a7458b2287b0ca83cb
TKO_ADDITIONAL_LABELS: org.opencontainers.image.revision=${{ github.sha }},org.opencontainers.image.version=${{ github.ref_name }}
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit 10ff8a9

Please sign in to comment.