From 88b9426c4711ee2f200d4df69b2603f0a98fc099 Mon Sep 17 00:00:00 2001 From: Devon McCarty Date: Wed, 6 Mar 2024 11:18:15 -0500 Subject: [PATCH] Switch to GitHub Actions. --- .github/workflows/build-and-publish.yml | 32 +++++++++++++++++++++++++ codeship-services.yml | 5 ---- codeship-steps.yml | 22 ----------------- dockercfg.encrypted | 2 -- 4 files changed, 32 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..65d09e0 --- /dev/null +++ b/.github/workflows/build-and-publish.yml @@ -0,0 +1,32 @@ +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 }} + + - 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 97adb0d..0000000 --- a/codeship-services.yml +++ /dev/null @@ -1,5 +0,0 @@ -app: - build: - image: silintl/restic-backup-restore-b2 - dockerfile: ./Dockerfile - cached: true diff --git a/codeship-steps.yml b/codeship-steps.yml deleted file mode 100644 index f4c89f0..0000000 --- a/codeship-steps.yml +++ /dev/null @@ -1,22 +0,0 @@ -- name: push_branch - service: app - type: push - image_name: silintl/restic-backup-restore-b2 - 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/restic-backup-restore-b2 - 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 12603fe..0000000 --- a/dockercfg.encrypted +++ /dev/null @@ -1,2 +0,0 @@ -codeship:v2 -jv+FH4Q5fpHWv/ZtASeAiHg4n8SU6Zqkw4dsEpbMqZhGa2ExFEhXqQOg5FBAuFyBgh+/d8qCmSUqyMKDoDJNipNvyj/nzOZteplVBkk4y0jm9eoVJgvM4xcNTvWZI5FYBKLJYo055PB4jasXikftjnE3FbBusa32IOSypKdYzTaLwMYoZ+DC0H2GO5nKPf3t1Cg2byCDKMCh2DRh7N7jZe6f2+hi9SXJUrUApb91Q/rafiq2MG1jkrsyqAtNCiT2xXfmz+J57wCQbp2erOLmEH2hsYSDcGx4u5oiVW3i/Zh8q9TujLs4Ub7Tl5rUpxtkAIyf8dXzQj+jojJI1+PrcJ6jFhIJhe9embStedRVz3HwJJwK3o7zvH0/dCH8Erj9T10aRUGD0OyBlhsnBNdCq7XGnOgp1fJfPO8DgRZXD/Bvt72e+vCbKQ== \ No newline at end of file