-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from IMIO/add-gh-actions
ADD gh actions
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |