Skip to content

Commit

Permalink
Backport GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
duchenean committed Oct 28, 2024
1 parent 1619c1b commit 661c146
Show file tree
Hide file tree
Showing 11 changed files with 203 additions and 170 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/docker-publish-base.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
name: Update base image

on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *' # Daily at 02:00

env:
IMAGE_NAME: delib/iadelib

jobs:
base:
runs-on: ubuntu-latest
runs-on: gha-runners-delib-py3
steps:
- name: Build and publish base image to harbor
uses: IMIO/buildout.pm/actions/harbor@master
uses: IMIO/gha/[email protected]
with:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
HARBOR_URL: ${{ secrets.HARBOR_URL }}
DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }}
DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }}
tags: |
imiobe/iadelib:base
"${{ secrets.HARBOR_URL }}/delib/iadelib:base"
dockerfile: ./docker/Dockerfile-base
IMAGE_NAME: ${{ env.IMAGE_NAME }}
IMAGE_TAGS: |
${{ secrets.HARBOR_URL }}/${{ env.IMAGE_NAME }}:base
REGISTRY_URL: ${{ secrets.HARBOR_URL }}
REGISTRY_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }}
MATTERMOST_WEBHOOK_URL: ${{ secrets.DELIB_MATTERMOST_WEBHOOK_URL }}
CONTEXT: '.'
DOCKERFILE: './docker/Dockerfile-base'
59 changes: 37 additions & 22 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,47 @@
name: Update images

on:
workflow_dispatch:
push:
branches: [ master ]

concurrency:
group: ${{ github.workflow }}

env:
IMAGE_NAME: delib/iadelib

jobs:
docker:
runs-on: ubuntu-latest
docker-latest:
runs-on: gha-runners-delib-py3
steps:
- name: Build latest
uses: IMIO/buildout.pm/actions/harbor@master
- name: Build and publish communes image to harbor
uses: IMIO/gha/[email protected]
with:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
HARBOR_URL: ${{ secrets.HARBOR_URL }}
DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }}
DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }}
tags: |
imiobe/iadelib:latest
"${{ secrets.HARBOR_URL }}/delib/iadelib:latest"
dockerfile: ./docker/Dockerfile-latest
IMAGE_NAME: ${{ env.IMAGE_NAME }}
IMAGE_TAGS: |
${{ secrets.HARBOR_URL }}/${{ env.IMAGE_NAME }}:latest
REGISTRY_URL: ${{ secrets.HARBOR_URL }}
REGISTRY_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }}
MATTERMOST_WEBHOOK_URL: ${{ secrets.DELIB_MATTERMOST_WEBHOOK_URL }}
CONTEXT: '.'
DOCKERFILE: './docker/Dockerfile-latest'
BUILD_ARGS: 'PROFILE=communes.cfg'

docker-dev:
runs-on: gha-runners-delib-py3
steps:
- name: Build and publish dev image
uses: IMIO/buildout.pm/actions/harbor@master
uses: IMIO/gha/[email protected]
with:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
HARBOR_URL: ${{ secrets.HARBOR_URL }}
DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }}
DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }}
tags: imiobe/iadelib:dev
dockerfile: ./docker/Dockerfile-dev
profile: communes-dev
IMAGE_NAME: ${{ env.IMAGE_NAME }}
IMAGE_TAGS: |
${{ secrets.HARBOR_URL }}/${{ env.IMAGE_NAME }}:dev
REGISTRY_URL: ${{ secrets.HARBOR_URL }}
REGISTRY_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }}
MATTERMOST_WEBHOOK_URL: ${{ secrets.DELIB_MATTERMOST_WEBHOOK_URL }}
CONTEXT: '.'
DOCKERFILE: './docker/Dockerfile-dev'
BUILD_ARGS: 'PROFILE=communes-dev.cfg'
Loading

0 comments on commit 661c146

Please sign in to comment.