Skip to content

Add initial workflows #1

Add initial workflows

Add initial workflows #1

# TODO
#name: Build and Push Docker Images
#
#on:
# 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/checkout@v4
#
# - 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-api Docker image
# id: docker_build
# uses: docker/build-push-action@v5
# with:
# file: ./container/fia_api.D
# push: true
# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/fia-api
#
# - name: Checkout the Gitops repository
# uses: actions/checkout@v4
# with:
# repository: fiaisis/gitops
# token: ${{ secrets.GITOPS_STAGING_EDIT_TOKEN }}
#
# - name: Edit the YAML fia-api file for staging
# uses: mikefarah/[email protected]
# with:
# cmd: yq e -i '.spec.template.spec.containers[] |= select(.name == "fia-api").image = "ghcr.io/fiaisis/fia-api@${{ steps.docker_build.outputs.digest }}"' './components/fia-api/overlays/staging/fia-api.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-api to use ${{ steps.docker_build.outputs.digest }}"
# git push