From de489fe79a0051bc956d08c88dd331600a9ce229 Mon Sep 17 00:00:00 2001 From: Louis Gallet Date: Sun, 3 Mar 2024 15:16:07 +0100 Subject: [PATCH] ci: :green_heart: Update ci with stagging and stable --- .github/workflows/push-docker-stable.yml | 50 +++++++++++++++++++ ...sh-docker.yml => push-docker-stagging.yml} | 3 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/push-docker-stable.yml rename .github/workflows/{push-docker.yml => push-docker-stagging.yml} (97%) diff --git a/.github/workflows/push-docker-stable.yml b/.github/workflows/push-docker-stable.yml new file mode 100644 index 0000000..45cabb3 --- /dev/null +++ b/.github/workflows/push-docker-stable.yml @@ -0,0 +1,50 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# GitHub recommends pinning actions to a commit SHA. +# To get a newer version, you will need to update the SHA. +# You can also reference a tag or branch, but the action may change without warning. + +name: Publish staging Docker image + +on: + push: + branches: + - main + +jobs: + push_to_registry: + name: Push Docker image to Gitea Container Registry + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + - name: Install Docker + run: curl -fsSL https://get.docker.com | sh + - name: Log in to Docker Hub + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + with: + registry: gitea.louisgallet.fr + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - + # Add support for more platforms with QEMU (optional) + # https://github.com/docker/setup-qemu-action + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + platforms: "linux/amd64,linux/arm64" + file: ./Dockerfile + push: true + tags: gitea.louisgallet.fr/lgallet/bot-louis:latest + labels: VERSION=stable diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker-stagging.yml similarity index 97% rename from .github/workflows/push-docker.yml rename to .github/workflows/push-docker-stagging.yml index 25676ae..df72163 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker-stagging.yml @@ -38,11 +38,12 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - + - name: Build and push Docker image uses: docker/build-push-action@v2 with: context: . + platforms: "linux/amd64,linux/arm64" file: ./Dockerfile push: true tags: gitea.louisgallet.fr/lgallet/bot-louis:staging