-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from zapier/split-image-binary
fix the release script, remove 'docker' refs
- Loading branch information
Showing
4 changed files
with
55 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
types: [published] | ||
|
||
jobs: | ||
release: | ||
release-binaries: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
|
@@ -31,12 +31,44 @@ jobs: | |
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push the Docker image | ||
- name: Build and push the binaries | ||
run: | | ||
earthly \ | ||
--push \ | ||
+release \ | ||
+release-binaries \ | ||
--version=${{ env.RELEASE_VERSION }} \ | ||
--commitSHA=${{ env.SHORT_SHA }} | ||
--image_name=ghcr.io/${{ github.repository_owner }}/prom-aggregation-gateway \ | ||
--token ${{ secrets.GITHUB_TOKEN }} | ||
release-image: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: checkout the source code | ||
uses: actions/checkout@v3 | ||
|
||
- uses: wistia/[email protected] | ||
|
||
- uses: earthly/actions-setup@v1 | ||
with: { version: "v${{ env.EARTHLY_TOOL_VERSION }}" } | ||
|
||
- name: Extract tag name | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
||
- name: Extract short sha | ||
run: echo "SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV | ||
|
||
- name: login to registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push the Docker image | ||
run: | | ||
earthly \ | ||
--push \ | ||
+build-image \ | ||
--version=${{ env.RELEASE_VERSION }} \ | ||
--commitSHA=${{ env.SHORT_SHA }} \ | ||
--image_name=ghcr.io/${{ github.repository_owner }}/prom-aggregation-gateway |
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
```mermaid | ||
graph TD | ||
build --> build-docker | ||
build --> build-helm | ||
build-docker --> build-binary | ||
continuous-deploy --> build-helm | ||
lint-golang --> go-deps | ||
test-golang --> go-deps | ||
test --> ci-golang | ||
release --> build-docker | ||
release --> release-binaries | ||
build-binary --> go-deps | ||
ci-golang --> lint-golang | ||
ci-golang --> test-golang | ||
ci-helm --> test-helm | ||
release-binaries --> build-binaries | ||
build --> build-helm | ||
build --> build-image | ||
build-binary --> go-deps | ||
build-image --> build-binary | ||
ci-golang --> lint-golang | ||
ci-golang --> test-golang | ||
ci-helm --> test-helm | ||
continuous-deploy --> build-helm | ||
lint-golang --> go-deps | ||
release --> build-image | ||
release --> release-binaries | ||
release-binaries --> build-binaries | ||
test --> ci-golang | ||
test-golang --> go-deps | ||
``` |
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