From 0329d22f6c2f0307f8b58c8df0e24d4345495e89 Mon Sep 17 00:00:00 2001 From: Devon McCarty Date: Wed, 6 Mar 2024 11:29:51 -0500 Subject: [PATCH 1/2] Switch to GitHub Actions. --- .github/workflows/build-and-publish.yml | 37 +++++++++++++++++++++++++ codeship-services.yml | 5 ---- codeship-steps.yml | 22 --------------- dockercfg.encrypted | 2 -- 4 files changed, 37 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/build-and-publish.yml delete mode 100644 codeship-services.yml delete mode 100644 codeship-steps.yml delete mode 100644 dockercfg.encrypted diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml new file mode 100644 index 0000000..4237f6f --- /dev/null +++ b/.github/workflows/build-and-publish.yml @@ -0,0 +1,37 @@ +name: Build and Publish + +on: + push: + +jobs: + build-and-publish: + name: Build and Publish + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }} + tags: | + type=ref,event=branch + type=ref,event=tag + # set latest tag for master branch + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/codeship-services.yml b/codeship-services.yml deleted file mode 100644 index 96a689d..0000000 --- a/codeship-services.yml +++ /dev/null @@ -1,5 +0,0 @@ -app: - build: - image: silintl/youtrack-backup - dockerfile: ./Dockerfile - cached: true diff --git a/codeship-steps.yml b/codeship-steps.yml deleted file mode 100644 index 91fc330..0000000 --- a/codeship-steps.yml +++ /dev/null @@ -1,22 +0,0 @@ -- name: push_branch - service: app - type: push - image_name: silintl/youtrack-backup - image_tag: "{{.Branch}}" - exclude: (main) - registry: https://index.docker.io/v1/ - encrypted_dockercfg_path: dockercfg.encrypted - -- name: push_latest - service: app - type: push - image_name: silintl/youtrack-backup - image_tag: "latest" - tag: main - registry: https://index.docker.io/v1/ - encrypted_dockercfg_path: dockercfg.encrypted - -#- name: test -# service: app -# command: echo "Image was tested" - diff --git a/dockercfg.encrypted b/dockercfg.encrypted deleted file mode 100644 index ed50750..0000000 --- a/dockercfg.encrypted +++ /dev/null @@ -1,2 +0,0 @@ -cloudbees:v1 -6WHygVcP8ORz7T9mPPH62qxW0lVq4L3qq2czf4be7DMDln8K+Rv/iBCL0ZrtFPFBVcPM8QTIOHjby/EMiWVbFUQ2X/kwird1Uw7u6Tau91KqqALic2CLavmBXCKWG4NY4aPHl4SufxjSZhwMx6taGsnNNWsVPEQeGU3IX6Bs7xMWrhshCIfIQUWzrp1j9HMjNX5sAheAOpJfdX5SCNJ5lZBJiz8qog8FhC9z7qgrYN3MURx8NEtPE6XPO0R8NOGjzqcN5O37qXjQZlpN45ifuxFdyQHU6nYStkfjfS9txJ/hCcFVvhR01SPvv4tffIdbz5pR3A/JoF6RA9wCGXOl2gJtZqsbDcWIgamoouxkH9YVKazU8NJK2YnEu/ijjYw/acA5pfiCLy8Qp3OVWjFbkoOaLJKOZfl7s0fW9kwRe3RSVWJBf3tQUQ== \ No newline at end of file From c42890f578b36149c35205cd209165ee0043870f Mon Sep 17 00:00:00 2001 From: Devon McCarty Date: Wed, 6 Mar 2024 15:16:41 -0500 Subject: [PATCH 2/2] Remove codeship references in dockerignore. --- .dockerignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index f1d320d..b6cf10a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,2 @@ *.aes -codeship-services.yml -codeship-steps.yml dockercfg