From 7941f889dc3dd95cb506f649f8e5b54687e89c61 Mon Sep 17 00:00:00 2001 From: Devon McCarty Date: Wed, 6 Mar 2024 11:27:57 -0500 Subject: [PATCH 1/4] 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 bfb9210..0000000 --- a/codeship-services.yml +++ /dev/null @@ -1,5 +0,0 @@ -app: - build: - image: silintl/tfc-backup-b2 - dockerfile: ./Dockerfile - cached: true diff --git a/codeship-steps.yml b/codeship-steps.yml deleted file mode 100644 index 4ef2f93..0000000 --- a/codeship-steps.yml +++ /dev/null @@ -1,22 +0,0 @@ -- name: push_branch - service: app - type: push - image_name: silintl/tfc-backup-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/tfc-backup-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 becba3e..0000000 --- a/dockercfg.encrypted +++ /dev/null @@ -1,2 +0,0 @@ -codeship:v2 -7dIJy1+PbnBmTeT07EE1uGyRLKXSVolFSBdCuppOIGWBGFaINyq82M6ggw37zZJewKvnjuMkgGFH2uEoDd7sSDFZnvNqgsAKvU9NGhl2hQqfPOgE2LZe4UbFuH/GGWXL/mQ24pDdxkE90GL6Zma1Is7O3yxybeffNEdMqIeEAwMR4IqB6Zp0I6RwcpMN+PrrpS3IYXUx78VHHMk9vYh2mC4+XI6mIKDZSKw/ozZTqGy4iJtY2HJuRuOGM8UanJAB+5s0f1NV5WAu0YW9Mdj3F4K8zPNdEVaC+lpM0hQpDxCOkurU1VuqKRylXUPWuHG/xoY5jB3yX7vkhJcsdckIoXXIB+S1Eki4U/+hOQ1Sc9Ftx38O4r9l4pu9G3k0dUVaGM7to3NikFWcWpLRAsbR4BOHN8eL34g+VWT715DK0hcDysBqdXBv3w== \ No newline at end of file From 108d5be1acd9e84c5fa0d2c24b81cc18ca3edc5d Mon Sep 17 00:00:00 2001 From: Devon McCarty Date: Wed, 6 Mar 2024 11:42:16 -0500 Subject: [PATCH 2/4] Update tfc-ops to 3.5.4 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7de5fb2..8980004 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM alpine:3 # Variables set with ARG can be overridden at image build time with # "--build-arg var=value". They are not available in the running container. ARG restic_ver=0.16.0 -ARG tfc_ops_ver=3.5.1 +ARG tfc_ops_ver=3.5.4 ARG tfc_ops_distrib=tfc-ops_${tfc_ops_ver}_Linux_x86_64.tar.gz # Install Restic, tfc-ops, perl, and jq From 7ba108a0ee0eb210968dd63b6d676861de559197 Mon Sep 17 00:00:00 2001 From: Devon McCarty Date: Wed, 6 Mar 2024 11:43:33 -0500 Subject: [PATCH 3/4] Remove tfc-ops version from filename. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8980004..df21f50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM alpine:3 # "--build-arg var=value". They are not available in the running container. ARG restic_ver=0.16.0 ARG tfc_ops_ver=3.5.4 -ARG tfc_ops_distrib=tfc-ops_${tfc_ops_ver}_Linux_x86_64.tar.gz +ARG tfc_ops_distrib=tfc-ops_Linux_x86_64.tar.gz # Install Restic, tfc-ops, perl, and jq RUN cd /tmp \ From 69b953ce3013448ffb4ed4a4fe49f47b66a32262 Mon Sep 17 00:00:00 2001 From: Devon McCarty Date: Wed, 6 Mar 2024 15:16:26 -0500 Subject: [PATCH 4/4] Remove codeship references in dockerignore. --- .dockerignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 91efad0..e38526a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,3 @@ *.aes -codeship-services.yml -codeship-steps.yml dockercfg *.env