Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorn01 committed Aug 13, 2024
1 parent 94d8835 commit c235e0c
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build Arches project
run-name: Build Arches project
on: [push, workflow_dispatch]
on:
push:
branches:
- '**'
workflow_dispatch:
env:
ARCHES_BASE: ghcr.io/flaxandteal/arches-base:coral-7.6
ARCHES_PROJECT: coral
Expand Down Expand Up @@ -54,7 +58,7 @@ jobs:
context: .
push: true
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}-${{ github.run_id }}
tags: ${{ steps.meta.outputs.tags }}-${{ github.run_id }},${{ steps.meta.outputs.tags }}-commit-${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
ARCHES_BASE=${{ env.ARCHES_BASE }}
Expand All @@ -63,7 +67,7 @@ jobs:
id: extract_image_name
run: |
name=${{ fromJSON(steps.build.outputs.metadata)['image.name'] }}
echo "image_name=$name" >> $GITHUB_OUTPUT
echo "image_name=$name" | sed 's/,.*//g' >> $GITHUB_OUTPUT
Build-Arches-Static:
runs-on: [self-hosted]
needs: [Build-Arches]
Expand Down Expand Up @@ -114,7 +118,7 @@ jobs:
file: docker/Dockerfile.static
network: host
allow: network.host
tags: ${{ steps.meta.outputs.tags }}-${{ github.run_id }}
tags: ${{ steps.meta.outputs.tags }}-${{ github.run_id }},${{ steps.meta.outputs.tags }}-commit-${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
ARCHES_DYNAMIC_IMAGE=${{ needs['Build-Arches'].outputs.image }}
Expand All @@ -127,7 +131,7 @@ jobs:
id: extract_image_name
run: |
name=${{ fromJSON(steps.buildx.outputs.metadata)['image.name'] }}
echo "image_name=$name" >> $GITHUB_OUTPUT
echo "image_name=$name" | sed 's/,.*//g' >> $GITHUB_OUTPUT
services:
elasticsearch:
image: elasticsearch:8.4.0
Expand Down Expand Up @@ -251,7 +255,7 @@ jobs:
file: docker/Dockerfile.static-py
network: host
allow: network.host
tags: ${{ steps.meta.outputs.tags }}-${{ github.run_id }}
tags: ${{ steps.meta.outputs.tags }}-${{ github.run_id }},${{ steps.meta.outputs.tags }}-commit-${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ steps.meta.outputs.tags }}-${{ github.run_id }}
Expand All @@ -263,7 +267,7 @@ jobs:
id: extract_image_name
run: |
name=${{ fromJSON(steps.buildx.outputs.metadata)['image.name'] }}
echo "image_name=$name" >> $GITHUB_OUTPUT
echo "image_name=$name" | sed 's/,.*//g' >> $GITHUB_OUTPUT
# Test-Arches:
# runs-on: [self-hosted]
# needs: [Build-Arches-Final]
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release update to UAT
run-name: Release update to UAT
on:
push:
tags: [ 'v*.*.*-RELEASE' ]
env:
ARCHES_BASE: ghcr.io/flaxandteal/arches-base:coral-7.6
ARCHES_PROJECT: coral
jobs:
Build-Arches:
runs-on: [self-hosted]
outputs:
image: ${{ steps.extract_image_name.outputs.image_name }}
steps:
- name: Set up Docker Context for Buildx
id: buildx-context
run: |
docker context create builders
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
endpoint: builders

- name: Echo extracted image name
run: |
echo "Extracted image name: ${{ steps.extract_image_name.outputs.image_name }}"
# name: Build docker backend image
# run: |
# docker build --build-arg ARCHES_BASE=${{ env.ARCHES_BASE }} --build-arg ARCHES_PROJECT=${{ env.ARCHES_PROJECT }} . -t arches_${{ env.ARCHES_PROJECT }}
- name: Log in to Github
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tag and push
run: |
docker pull ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}:main-commit-${{ github.sha }}
docker pull ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}_static:main-commit-${{ github.sha }}
docker pull ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}_static_py:main-commit-${{ github.sha }}
docker tag ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}:main-commit-${{ github.sha }} ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}:${{ github.ref_name }}
docker tag ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}_static:main-commit-${{ github.sha }} ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}_static:${{ github.ref_name }}
docker tag ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}_static_py:main-commit-${{ github.sha }} ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}_static_py:${{ github.ref_name }}
docker push ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}:${{ github.ref_name }}
docker push ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}_static:${{ github.ref_name }}
docker push ghcr.io/flaxandteal/arches_${{ env.ARCHES_PROJECT }}_static_py:${{ github.ref_name }}

0 comments on commit c235e0c

Please sign in to comment.