-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
843bdf1
commit a58d467
Showing
1 changed file
with
26 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
|
@@ -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 |