-
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 #60 from valory-xyz/feat/release-flow
Add release flow for docker images
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Release Flow | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish-images: | ||
name: Publish Docker Images | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.10"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup | ||
run: | | ||
echo export TAG=$(git describe --tags --abbrev=0) > env.sh | ||
cp scripts/mainnet_snapshot.json ./sanpshot.json | ||
- name: Build version tagged images | ||
run: | | ||
source env.sh | ||
docker build . -t valory/autonolas-registries:$TAG -f ./Dockerfile | ||
- name: Tag to latest | ||
run: | | ||
source env.sh | ||
docker tag valory/autonolas-registries:$TAG valory/autonolas-registries:latest | ||
- name: Docker login | ||
env: | ||
DOCKER_USER: ${{secrets.DOCKER_USER}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
run: | | ||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
- name: Docker Push | ||
run: | | ||
source env.sh | ||
docker push valory/autonolas-registries:$TAG | ||
docker push valory/autonolas-registries:latest |