From 5eb7a0d135f29901358f72351a442111ce49297c Mon Sep 17 00:00:00 2001 From: Viraj Patel Date: Mon, 23 Jan 2023 21:31:31 +0530 Subject: [PATCH 1/3] feat: add release flow --- .github/workflows/release.yaml | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..ba5bef92 --- /dev/null +++ b/.github/workflows/release.yaml @@ -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 deployments/Dockerfiles/documentation/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 From febcf40ac46bdf14e4a7da57aefc1037450c7c2e Mon Sep 17 00:00:00 2001 From: Viraj Patel Date: Tue, 24 Jan 2023 12:25:24 +0530 Subject: [PATCH 2/3] chore: fix dockerfile path --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ba5bef92..d5be4844 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,7 +21,7 @@ jobs: - name: Build version tagged images run: | source env.sh - docker build -t valory/autonolas-registries:$TAG -f deployments/Dockerfiles/documentation/Dockerfile + docker build -t valory/autonolas-registries:$TAG -f ./Dockerfile - name: Tag to latest run: | source env.sh From 84298f2d4dda35ff2da9e040a2db92304e6cf1f3 Mon Sep 17 00:00:00 2001 From: Viraj Patel Date: Tue, 24 Jan 2023 12:27:21 +0530 Subject: [PATCH 3/3] fix: build command --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d5be4844..74f7c99c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,7 +21,7 @@ jobs: - name: Build version tagged images run: | source env.sh - docker build -t valory/autonolas-registries:$TAG -f ./Dockerfile + docker build . -t valory/autonolas-registries:$TAG -f ./Dockerfile - name: Tag to latest run: | source env.sh