Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add circleci pipeline to publish the docker image to docker hub #21

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/ for more details
version: 2
jobs:
build:
machine: true
steps:
- checkout
- run:
name: Build image
command: |
docker build . -t thoughtmachine/generic-k8s-webhook:"$CIRCLE_SHA1"

build_and_release:
machine: true
steps:
- checkout
- run:
name: Build image
command: |
docker build . -t thoughtmachine/generic-k8s-webhook:"$CIRCLE_SHA1" -t thoughtmachine/generic-k8s-webhook:"$CIRCLE_TAG"
- run:
name: Publish image to Docker Hub
command: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker push thoughtmachine/generic-k8s-webhook:"$CIRCLE_SHA1"
docker push thoughtmachine/generic-k8s-webhook:"$CIRCLE_TAG"

workflows:
version: 2
build-master:
jobs:
- build_and_release:
context: conntest-dockerhub-release
filters:
tags:
only: /.*/
61 changes: 0 additions & 61 deletions .github/workflows/publish-artifacts.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,3 @@ jobs:

- name: Run unittests
run: poetry run pytest tests --timeout 15

build-docker-image:
name: Build docker image
runs-on: ubuntu-latest
steps:
- name: Setup Action
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build image
uses: docker/build-push-action@v4