From a4858df85b38fa96c5e56fc190c3452e48a5ecdc Mon Sep 17 00:00:00 2001 From: schklom <23263086+schklom@users.noreply.github.com> Date: Thu, 2 Dec 2021 21:53:36 +0100 Subject: [PATCH 1/2] Create dependabot.yml Will update GitHub actions to be at the latest version --- .github/dependabot.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..2c7d170 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" From 9a20ddb82ecc1a7bbc793b1810681f35694837a8 Mon Sep 17 00:00:00 2001 From: schklom <23263086+schklom@users.noreply.github.com> Date: Thu, 2 Dec 2021 22:02:20 +0100 Subject: [PATCH 2/2] Create Multi_platform_build_publish_Docker.yml On push and pull, trigger a multi-platform build of the Dockerfile and publish the image on DockerHub at xtrendence/filedrop:latest You will need to setup GitHub secrets (DOCKERHUB_USERNAME and DOCKERHUB_TOKEN) for this to run --- .../Multi_platform_build_publish_Docker.yml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/Multi_platform_build_publish_Docker.yml diff --git a/.github/workflows/Multi_platform_build_publish_Docker.yml b/.github/workflows/Multi_platform_build_publish_Docker.yml new file mode 100644 index 0000000..ba010a7 --- /dev/null +++ b/.github/workflows/Multi_platform_build_publish_Docker.yml @@ -0,0 +1,48 @@ +name: Multi_platform_build_publish_Docker + +on: + # Triggers the workflow, remove the triggers you don't like/want + #schedule: + # * is a special character in YAML so you have to quote this string + #- cron: '0 0 * * *' + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: # This one is if you want to manually trigger in the Actions tab, useful to see if it works as intended + +jobs: + buildandpush: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: 'main' # branch, I think you can remove it + # https://github.com/docker/setup-qemu-action#usage + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + # https://github.com/marketplace/actions/docker-setup-buildx + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + #- name: Available platforms + # run: echo ${{ steps.buildx.outputs.platforms }} + # https://github.com/docker/login-action#docker-hub + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # https://github.com/docker/build-push-action#multi-platform-image + - name: Build and push Filedrop + uses: docker/build-push-action@v2 + with: + context: . + file: Dockerfile + #platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + pull: true + push: true + tags: | + xtrendence/filedrop:latest