Skip to content

Commit

Permalink
chore(build): use dependabot and remove buildx usage
Browse files Browse the repository at this point in the history
  • Loading branch information
o-orand committed Mar 24, 2023
1 parent 8bc3695 commit 6a465bb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
24 changes: 11 additions & 13 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
branches: [ "main" ]
env:
DOCKERHUB_ORG: elpaasoci
OCI_IMAGE: git-branch-heads-resource

jobs:
build_and_publish:
Expand All @@ -31,32 +32,29 @@ 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/[email protected]
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'
uses: docker/[email protected]
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}}

0 comments on commit 6a465bb

Please sign in to comment.