Skip to content

Commit

Permalink
Temporarily build on push
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Jan 9, 2025
1 parent 843bdf1 commit a58d467
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/build-push-action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: Build and Push Docker Images

on:
push:
branches:
- main
on: push
# push:
# branches:
# - main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}
Expand Down Expand Up @@ -44,25 +44,25 @@ jobs:
# push: true
# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/scigateway:${{ 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 frontend file for staging
uses: mikefarah/[email protected]
with:
cmd: yq e -i '.spec.template.spec.containers[] |= select(.name == "frontend").image = "ghcr.io/fiaisis/frontend@${{ steps.frontend_build.outputs.digest }}"' './components/frontend/envs/staging/frontend.yml'

# - name: Edit the YAML scigateway file for staging
# uses: mikefarah/[email protected]
# with:
# cmd: yq e -i '.spec.template.spec.containers[] |= select(.name == "scigateway").image = "ghcr.io/fiaisis/scigateway@${{ steps.scigateway_build.outputs.digest }}"' './components/scigateway/envs/staging/scigateway.yml'

- name: Commit and push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "[CD] Update frontend with this commit ${{ github.event.head_commit.url}}"
git push
# - name: Checkout the Gitops repository
# uses: actions/checkout@v4
# with:
# repository: fiaisis/gitops
# token: ${{ secrets.GITOPS_STAGING_EDIT_TOKEN }}
#
# - name: Edit the YAML frontend file for staging
# uses: mikefarah/[email protected]
# with:
# cmd: yq e -i '.spec.template.spec.containers[] |= select(.name == "frontend").image = "ghcr.io/fiaisis/frontend@${{ steps.frontend_build.outputs.digest }}"' './components/frontend/envs/staging/frontend.yml'
#
# # - name: Edit the YAML scigateway file for staging
# # uses: mikefarah/[email protected]
# # with:
# # cmd: yq e -i '.spec.template.spec.containers[] |= select(.name == "scigateway").image = "ghcr.io/fiaisis/scigateway@${{ steps.scigateway_build.outputs.digest }}"' './components/scigateway/envs/staging/scigateway.yml'
#
# - name: Commit and push changes
# run: |
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Action"
# git commit -am "[CD] Update frontend with this commit ${{ github.event.head_commit.url}}"
# git push

0 comments on commit a58d467

Please sign in to comment.