name: Build and publish to ECR

on:
  workflow_dispatch:
    branches:
      - main
  push:
    branches:
      - main
    paths-ignore:
      - "Jenkinsfile"
      - ".git**"

jobs:
  build-publish-image-to-ecr:
    uses: alphagov/govuk-infrastructure/.github/workflows/ci-ecr.yaml@main
    secrets:
      AWS_GOVUK_ECR_ACCESS_KEY_ID: ${{ secrets.AWS_GOVUK_ECR_ACCESS_KEY_ID }}
      AWS_GOVUK_ECR_SECRET_ACCESS_KEY: ${{ secrets.AWS_GOVUK_ECR_SECRET_ACCESS_KEY }}

name: Build and publish to ECR

on:
  workflow_dispatch:
    branches:
      - main
  push:
    branches:
      - main
    paths-ignore:
      - "Jenkinsfile"
      - ".git**"

jobs:
  build-publish-image-to-ecr:
    uses: alphagov/govuk-infrastructure/.github/workflows/ci-ecr.yaml@resusable-workflows
    secrets:
      AWS_GOVUK_ECR_ACCESS_KEY_ID: ${{ secrets.AWS_GOVUK_ECR_ACCESS_KEY_ID }}
      AWS_GOVUK_ECR_SECRET_ACCESS_KEY: ${{ secrets.AWS_GOVUK_ECR_SECRET_ACCESS_KEY }}

Change the branch reference for reusable workflows
Change the branch reference for reusable workflows

This changes the branch reference for reusuable GitHub Action workflow
used to build and push the image. This is workflow is contained in
another repository and to make development easier, swwitching the
reference from the main branch, so a changes to don't need to be merged
to main before testing. This commit should be reverted.
