Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Update build-authentik2.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Lavish Gupta <146554957+lavishiamops@users.noreply.github.com>
  • Loading branch information
lavishiamops authored Sep 6, 2024
1 parent eadec73 commit de39df2
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/build-authentik2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,32 @@ jobs:
id: extract-tag
run: echo "tag_name=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT

# Build-Authentik:
# if: github.event_name == 'workflow_dispatch'
# name: Build Authentik Image
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
Build-Authentik:
if: github.event_name == 'workflow_dispatch'
name: Build Authentik Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# role-to-assume: ${{ secrets.SCRIBE2_GITHUB_ROLE_DEV }}
# role-session-name: Github
# aws-region: ${{ secrets.AWS_REGION_DEV }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.SCRIBE2_GITHUB_ROLE_DEV }}
role-session-name: Github
aws-region: ${{ secrets.AWS_REGION_DEV }}

# - name: Login to Amazon ECR
# id: login-ecr
# uses: aws-actions/amazon-ecr-login@v2
# with:
# mask-password: 'true'
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
mask-password: 'true'

# - name: Build, Tag and Push Authentik Image to Amazon ECR
# id: build-image
# run: |
# DOCKER_BUILDKIT=1 docker build -t ${{ steps.login-ecr.outputs.registry }}/authentik:${{ github.sha }} .
# docker push ${{ steps.login-ecr.outputs.registry }}/authentik:${{ github.sha }}
- name: Build, Tag and Push Authentik Image to Amazon ECR
id: build-image
run: |
DOCKER_BUILDKIT=1 docker build -t ${{ steps.login-ecr.outputs.registry }}/authentik:${{ github.sha }} .
docker push ${{ steps.login-ecr.outputs.registry }}/authentik:${{ github.sha }}
Build-Authentik-Image-Release:
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')
Expand Down Expand Up @@ -106,10 +106,10 @@ jobs:
docker push ${{ steps.login-ecr-prod.outputs.registry }}/authentik:${{ needs.Stage-Setup-Release.outputs.tag_name }}
Update-Environment-Variable:
if: ${{ always() && github.event_name == 'workflow_dispatch' }}
if: ${{ always() && github.event_name == 'workflow_dispatch' && needs.Build-Authentik.result == 'success' }}
name: Update Environment Variable with Docker Image Tag
runs-on: ubuntu-latest
# needs: [Build-Authentik]
needs: [Build-Authentik]
steps:
- name: Update Environment Variable
run: |
Expand Down

0 comments on commit de39df2

Please sign in to comment.