Skip to content

Commit

Permalink
chore: update env
Browse files Browse the repository at this point in the history
  • Loading branch information
iosh committed Jul 3, 2024
1 parent e69df53 commit e79e60d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ jobs:

- name: Remove v prefix
id: remove_prefix
env:
TAG_NAME: ${{ github.ref_name }}
run: |
echo "CLEANED_TAG_NAME=${TAG_NAME#v}" >> $GITHUB_ENV
echo Version: $CLEANED_TAG_NAME
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
Expand All @@ -37,4 +36,4 @@ jobs:
file: ./Dockerfile.dev.buildx
platforms: linux/amd64,linux/arm64
push: true
tags: confluxchain/conflux-rust:${CLEANED_TAG_NAME},confluxchain/conflux-rust:latest
tags: confluxchain/conflux-rust:${VERSION},confluxchain/conflux-rust:latest
12 changes: 5 additions & 7 deletions .github/workflows/mainNet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ jobs:

- name: Remove tag suffix
id: remove_suffix
env:
TAG_NAME: ${{ github.ref_name }}
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
CLEANED_TAG_NAME=${TAG_NAME#v}
CLEANED_TAG_NAME=${CLEANED_TAG_NAME%-mainnet}
echo "CLEANED_TAG_NAME::${CLEANED_TAG_NAME}" >> $GITHUB_ENV
VERSION=${GITHUB_REF_NAME#v}
VERSION=${VERSION%-mainnet}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
Expand All @@ -37,4 +35,4 @@ jobs:
file: ./Dockerfile.buildx
platforms: linux/amd64,linux/arm64
push: true
tags: confluxchain/conflux-rust:${CLEANED_TAG_NAME}-mainnet
tags: confluxchain/conflux-rust:${VERSION}-mainnet
9 changes: 5 additions & 4 deletions .github/workflows/testNet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ jobs:

- name: Remove v prefix
id: remove_prefix
env:
TAG_NAME: ${{ github.ref_name }}
run: echo "CLEANED_TAG_NAME=${TAG_NAME#v}" >> $GITHUB_ENV
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
Expand All @@ -33,4 +34,4 @@ jobs:
file: ./Dockerfile.buildx
platforms: linux/amd64,linux/arm64
push: true
tags: confluxchain/conflux-rust:${CLEANED_TAG_NAME}
tags: confluxchain/conflux-rust:${VERSION}

0 comments on commit e79e60d

Please sign in to comment.