ASI upgrade: fixing hardcoded address prefix in token faucet (#204) #54
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: Build and push images | |
on: | |
push: | |
tags: | |
- '*' | |
env: | |
REGISTRY: gcr.io/fetch-ai-images | |
jobs: | |
build-and-push: | |
timeout-minutes: 30 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get tag name | |
id: tag_name | |
run: | | |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/} | |
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/} | |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} | |
- name: Login to Docker hub, build and push | |
run: | | |
SHORTVERSION=${SOURCE_TAG%.*} | |
docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }} | |
docker build -t fetchai/cosmos-explorer:$SOURCE_TAG . | |
docker push fetchai/cosmos-explorer:$SOURCE_TAG | |
docker tag fetchai/cosmos-explorer:$SOURCE_TAG fetchai/cosmos-explorer:$SHORTVERSION | |
docker push fetchai/cosmos-explorer:$SHORTVERSION | |
env: | |
SOURCE_TAG: ${{ steps.tag_name.outputs.SOURCE_TAG }} | |
- name: Setup GCloud | |
uses: google-github-actions/setup-gcloud@v0 | |
with: | |
service_account_key: ${{ secrets.GCLOUD_KEY_IMAGES }} | |
- name: Configure Docker | |
run: | | |
gcloud auth configure-docker | |
- name: Build and push to GCR | |
run: | | |
SHORTVERSION=${SOURCE_TAG%.*} | |
docker tag fetchai/cosmos-explorer:$SOURCE_TAG $REGISTRY/cosmos-explorer:$SOURCE_TAG | |
docker tag $REGISTRY/cosmos-explorer:$SOURCE_TAG $REGISTRY/cosmos-explorer:$SHORTVERSION | |
docker push $REGISTRY/cosmos-explorer:$SOURCE_TAG | |
docker push $REGISTRY/cosmos-explorer:$SHORTVERSION | |
env: | |
SOURCE_TAG: ${{ steps.tag_name.outputs.SOURCE_TAG }} |