Skip to content

Commit 55b4ba5

Browse files
authored
Move docker-tagged circleci job to gh actions (#2329)
1 parent 3bacfd3 commit 55b4ba5

File tree

2 files changed

+25
-31
lines changed

2 files changed

+25
-31
lines changed

.circleci/config.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -223,40 +223,12 @@ jobs:
223223
docker push cosmwasm/wasmd:latest
224224
docker logout
225225
226-
docker-tagged:
227-
executor: golang
228-
steps:
229-
- attach_workspace:
230-
at: /tmp/workspace
231-
- checkout
232-
- setup_remote_docker:
233-
docker_layer_caching: true
234-
- run:
235-
name: Build Docker image
236-
command: docker build --pull -t "cosmwasm/wasmd:${CIRCLE_TAG}" .
237-
- run:
238-
name: Push application Docker image to docker hub
239-
command: |
240-
docker login --password-stdin -u "$DOCKER_USER" \<<<"$DOCKER_PASS"
241-
docker push "cosmwasm/wasmd:${CIRCLE_TAG}"
242-
docker logout
243-
244226
workflows:
245227
test-suite:
246228
jobs:
247229
- docker-image:
248230
requires:
249231
- setup-dependencies
250-
- docker-tagged:
251-
filters:
252-
tags:
253-
only:
254-
- /^v.*/
255-
branches:
256-
ignore:
257-
- /.*/
258-
requires:
259-
- setup-dependencies
260232
- setup-dependencies:
261233
# filters here are needed to enable this job also for tags
262234
filters:

.github/workflows/release.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,40 @@ on:
88
permissions:
99
contents: write
1010

11+
env:
12+
IMAGE_NAME: cosmwasm/wasmd
13+
1114
jobs:
1215
release:
1316
runs-on: ubuntu-latest
1417
steps:
1518
- name: Checkout code
1619
uses: actions/checkout@v4
1720

21+
- name: Set up Docker
22+
uses: docker/setup-buildx-action@v3
23+
24+
- name: Build Docker image
25+
run: |
26+
TAG=${{ github.ref_name }}
27+
docker build --pull -t $IMAGE_NAME:$TAG .
28+
29+
- name: Push Docker image
30+
env:
31+
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
32+
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
33+
run: |
34+
TAG=${{ github.ref_name }}
35+
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
36+
docker push $IMAGE_NAME:$TAG
37+
docker logout
38+
1839
- name: Draft GitHub release
1940
env:
2041
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2142
run: |
22-
gh release create "${GITHUB_REF_NAME}" \
23-
--title "${GITHUB_REF_NAME}" \
43+
TAG=${{ github.ref_name }}
44+
gh release create "$TAG" \
45+
--title "$TAG" \
2446
--draft \
25-
--notes "See the [CHANGELOG](https://github.com/CosmWasm/wasmd/blob/${GITHUB_REF_NAME}/CHANGELOG.md) for details on the changes in this version."
47+
--notes "See the [CHANGELOG](https://github.com/CosmWasm/wasmd/blob/$TAG/CHANGELOG.md) for details on the changes in this version."

0 commit comments

Comments
 (0)