Skip to content

Commit

Permalink
Merge pull request #2 from IMIO/add-gh-actions
Browse files Browse the repository at this point in the history
ADD gh actions
  • Loading branch information
duchenean authored Dec 12, 2023
2 parents fe393a2 + e21c26d commit 5af685a
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/docker-hub-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Update images
on:
workflow_dispatch:
push:

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Build latest
uses: IMIO/buildout.pm.portal/actions/harbor@add-gh-actions
with:
HARBOR_URL: ${{ secrets.HARBOR_URL }}
DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }}
DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }}
tags: "${{ secrets.HARBOR_URL }}/delib/citizenportal:latest"
43 changes: 43 additions & 0 deletions actions/harbor/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 'Build and publish to harbor'
description: 'Build and publish to IMIO container registry (harbor)'
inputs:
HARBOR_URL:
description: 'HARBOR_URL'
required: true
DELIB_HARBOR_USERNAME:
description: 'DELIB_HARBOR_USERNAME'
required: true
DELIB_HARBOR_PASSWORD:
description: 'DELIB_HARBOR_PASSWORD'
required: true
tags:
description: 'Tag name'
required: false
dockerfile:
description: 'Path to Dockerfile'
required: true
default: Dockerfile
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Harbor
uses: docker/login-action@v3
with:
registry: ${{ inputs.HARBOR_URL }}
username: ${{ inputs.DELIB_HARBOR_USERNAME }}
password: ${{ inputs.DELIB_HARBOR_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ${{ inputs.dockerfile }}
tags: ${{ inputs.tags }}
platforms: linux/amd64
pull: true
push: true

0 comments on commit 5af685a

Please sign in to comment.