Skip to content

Commit

Permalink
improve github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulh committed Sep 4, 2023
1 parent 4806a65 commit a63bf13
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/docker-publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:

env:
REGISTRY_IMAGE: ghcr.io/calaos/calaos_base
NAME: calaos_base
CALAOS_REL_URL: https://releases.calaos.fr/v4/image-dev
IMG_TAG: dev

jobs:
# define job to build and publish docker image
Expand Down Expand Up @@ -57,8 +60,8 @@ jobs:
push: true
build-args: APP_VERSION=${{ steps.bump_version.outputs.next-version }}
tags: |
ghcr.io/calaos/calaos_base:dev
ghcr.io/calaos/calaos_base:${{ steps.bump_version.outputs.next-version }}
${{ env.REGISTRY_IMAGE }}:${{ env.IMG_TAG }}
${{ env.REGISTRY_IMAGE }}:${{ steps.bump_version.outputs.next-version }}
- name: Create Tag
uses: negz/create-tag@v1
Expand All @@ -69,8 +72,8 @@ jobs:
- name: update calaos release
uses: fjogeleit/http-request-action@v1
with:
url: 'https://releases.calaos.fr/v4/image-dev/calaos_base'
url: '${{ env.CALAOS_REL_URL }}/${{ env.NAME }}'
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
bearerToken: ${{ secrets.CALAOS_REL_TOKEN }}
data: '{"name": "calaos_base", "source": "ghcr.io/calaos/calaos_base:${{ steps.bump_version.outputs.next-version }}", "version": "${{ steps.bump_version.outputs.next-version }}"}'
data: '{"name": "${{ env.NAME }}", "source": "${{ env.REGISTRY_IMAGE }}:${{ steps.bump_version.outputs.next-version }}", "version": "${{ steps.bump_version.outputs.next-version }}"}'
11 changes: 7 additions & 4 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:

env:
REGISTRY_IMAGE: ghcr.io/calaos/calaos_base
NAME: calaos_base
CALAOS_REL_URL: https://releases.calaos.fr/v4/image
IMG_TAG: latest

jobs:
# define job to build and publish docker image
Expand Down Expand Up @@ -66,8 +69,8 @@ jobs:
push: true
build-args: APP_VERSION=${{ steps.bump_version.outputs.next-version }}
tags: |
ghcr.io/calaos/calaos_base:latest
ghcr.io/calaos/calaos_base:${{ steps.bump_version.outputs.next-version }}
${{ env.REGISTRY_IMAGE }}:${{ env.IMG_TAG }}
${{ env.REGISTRY_IMAGE }}:${{ steps.bump_version.outputs.next-version }}
- name: Create Tag
uses: negz/create-tag@v1
Expand All @@ -78,8 +81,8 @@ jobs:
- name: update calaos release
uses: fjogeleit/http-request-action@v1
with:
url: 'https://releases.calaos.fr/v4/image/calaos_base'
url: '${{ env.CALAOS_REL_URL }}/${{ env.NAME }}'
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
bearerToken: ${{ secrets.CALAOS_REL_TOKEN }}
data: '{"name": "calaos_base", "source": "ghcr.io/calaos/calaos_base:${{ steps.bump_version.outputs.next-version }}", "version": "${{ steps.bump_version.outputs.next-version }}"}'
data: '{"name": "${{ env.NAME }}", "source": "${{ env.REGISTRY_IMAGE }}:${{ steps.bump_version.outputs.next-version }}", "version": "${{ steps.bump_version.outputs.next-version }}"}'

0 comments on commit a63bf13

Please sign in to comment.