Merge pull request #88 from alephium/fix-wrapped-token-name #12
Workflow file for this run
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
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 |