-
Notifications
You must be signed in to change notification settings - Fork 4
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 #84 from alephium/test-image-publish
Publish Docker Images
- Loading branch information
Showing
5 changed files
with
77 additions
and
49 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 |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
with: | ||
node-version: '16' | ||
- name: build devnet docker images | ||
run: ./build-docker-images.sh "devnet" | ||
run: ./build-docker-images.sh "devnet" "latest" | ||
- name: docker system prune | ||
run: docker system prune -f | ||
- name: start docker images | ||
|
@@ -44,22 +44,3 @@ jobs: | |
if: success() || failure() | ||
uses: jwalton/[email protected] | ||
# Next publish docker images after integration tests pass | ||
publish: | ||
needs: test | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- id: 'auth' | ||
uses: 'google-github-actions/auth@v0' | ||
with: | ||
workload_identity_provider: projects/1004240933630/locations/global/workloadIdentityPools/github-pool/providers/github-provider | ||
service_account: [email protected] | ||
- name: auth docker | ||
run: gcloud auth configure-docker | ||
- name: build and push testnet docker images | ||
run: ./build-docker-images.sh "testnet" true |
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,47 @@ | ||
name: Publish Docker Images | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
get_dist_tag: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
DIST_TAG: ${{ steps.get_tag.outputs.DIST_TAG }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Get the tag name | ||
id: get_tag | ||
run: | | ||
tag=$(echo ${GITHUB_REF/refs\/tags\//} | cut -c 2-) | ||
dist_tag=$([[ $tag =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo latest || echo "") | ||
dist_tag=$([[ $tag =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$ ]] && echo rc || echo $dist_tag) | ||
[ -z "$dist_tag" ] && echo "Distribution tag is not set to latest nor to rc" && exit 1 | ||
echo ::set-output name=DIST_TAG::$dist_tag | ||
shell: bash | ||
publish: | ||
runs-on: ubuntu-20.04 | ||
needs: get_dist_tag | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- id: 'auth' | ||
uses: 'google-github-actions/auth@v0' | ||
with: | ||
workload_identity_provider: projects/1004240933630/locations/global/workloadIdentityPools/github-pool/providers/github-provider | ||
service_account: [email protected] | ||
- name: auth docker | ||
run: gcloud auth configure-docker | ||
- name: build and push testnet docker images | ||
run: ./build-docker-images.sh "testnet" ${{ needs.get_dist_tag.outputs.DIST_TAG }} true |
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ Build the docker images: | |
```sh | ||
git clone [email protected]:alephium/wormhole-fork.git | ||
cd wormhole-fork/ | ||
./build-docker-images.sh devnet | ||
./build-docker-images.sh devnet latest | ||
``` | ||
|
||
Start the devnet: | ||
|
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