From 6a465bb75e798426d5865bd788bae906f31c69d0 Mon Sep 17 00:00:00 2001 From: Olivier ORAND Date: Fri, 24 Mar 2023 11:18:03 +0000 Subject: [PATCH] chore(build): use dependabot and remove buildx usage --- .github/dependabot.yml | 7 +++++++ .github/workflows/docker-image.yml | 24 +++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..583decf --- /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" \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index df83371..f9cf5b6 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -10,6 +10,7 @@ on: branches: [ "main" ] env: DOCKERHUB_ORG: elpaasoci + OCI_IMAGE: git-branch-heads-resource jobs: build_and_publish: @@ -31,23 +32,16 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - - # Setting up Docker Buildx with docker-container driver is required - # at the moment to be able to use a subdirectory with Git context - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - name: publish git-branch-heads-resource standard image uses: docker/build-push-action@v4.0.0 with: push: true tags: | - ${{env.DOCKERHUB_ORG}}/${{env.IMAGE}}:latest - ${{env.DOCKERHUB_ORG}}/${{env.IMAGE}}:${{github.sha}} + ${{env.DOCKERHUB_ORG}}/${{env.OCI_IMAGE}}:latest + ${{env.DOCKERHUB_ORG}}/${{env.OCI_IMAGE}}:${{github.sha}} ghcr.io/${{ github.repository }}:latest ghcr.io/${{ github.repository }}:${{github.sha}} - env: - IMAGE: git-branch-heads-resource - name: publish git-branch-heads-resource tagged image if: github.ref_type == 'tag' @@ -55,8 +49,12 @@ jobs: with: push: true tags: | - ${{env.DOCKERHUB_ORG}}/${{env.IMAGE}}:${{github.ref_name}} + ${{env.DOCKERHUB_ORG}}/${{env.OCI_IMAGE}}:${{github.ref_name}} ghcr.io/${{ github.repository }}:${{github.ref_name}} - env: - IMAGE: git-branch-heads-resource - + - + name: Update repo description + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + repository: ${{env.DOCKERHUB_ORG}}/${{env.OCI_IMAGE}}