Skip to content

Dont verify twice

Dont verify twice #26

Workflow file for this run

---
name: Build and Push Docker Images
on: push
# push:
# branches:
# - main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out code
uses: actions/[email protected]
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.WRITE_PACKAGE_TOKEN }}
- name: Build and push fia-auth Docker image
id: docker_build
uses: docker/build-push-action@v5
with:
file: ./container/fia-auth.Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/fia-auth:${{ github.sha }}
- name: Checkout the Gitops repository
uses: actions/checkout@v4
with:
repository: fiaisis/gitops
token: ${{ secrets.GITOPS_STAGING_EDIT_TOKEN }}
- name: Edit the YAML fia-auth file for staging
uses: mikefarah/[email protected]
with:
cmd: yq e -i '.spec.template.spec.containers[] |= select(.name == "fia-auth").image = "ghcr.io/fiaisis/fia-auth@${{ steps.docker_build.outputs.digest }}"' './components/fia-auth/envs/staging/fia-auth.yml'
- name: Commit and push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "Update fia-auth to use ${{ steps.docker_build.outputs.digest }}"
git push