generated from int128/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Release v2 * Add doc * Fix
- Loading branch information
Showing
9 changed files
with
282 additions
and
617 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: docker-build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
images: | ||
description: Passed to docker/metadata-action | ||
type: string | ||
required: true | ||
cache-image: | ||
description: Passed to int128/docker-build-cache-config-action | ||
type: string | ||
required: true | ||
context: | ||
description: Passed to docker/build-push-action | ||
type: string | ||
required: true | ||
platforms: | ||
description: Passed to docker/build-push-action | ||
type: string | ||
required: true | ||
outputs: | ||
image-uri: | ||
description: Image URI | ||
value: ${{ jobs.build.outputs.image-uri }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
outputs: | ||
image-uri: ghcr.io/${{ github.repository }}/e2e@${{ steps.build.outputs.digest }} | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4 # v5.3.0 | ||
id: metadata | ||
with: | ||
images: ${{ inputs.images }} | ||
# avoid overwriting the latest tag because metadata-action does not add a suffix to it | ||
flavor: latest=false,suffix=-amd64 | ||
- uses: int128/docker-build-cache-config-action@1ae274f683e01b2b3eb290167f51590fd7035316 # v1.28.0 | ||
id: cache | ||
with: | ||
image: ${{ inputs.cache-image }} | ||
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 | ||
- uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 | ||
id: build | ||
with: | ||
push: true | ||
context: ${{ inputs.context }} | ||
tags: ${{ steps.metadata.outputs.tags }} | ||
labels: ${{ steps.metadata.outputs.labels }} | ||
cache-from: ${{ steps.cache.outputs.cache-from }} | ||
cache-to: ${{ steps.cache.outputs.cache-to }} | ||
platforms: ${{ inputs.platforms }} |
Oops, something went wrong.