Skip to content

Commit

Permalink
Push new images to config repos
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Aug 12, 2024
1 parent 4fad2ea commit 885e650
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,56 @@ jobs:
latest: ${{ github.ref == 'refs/heads/main' }}
github-token: ${{ secrets.GITHUB_TOKEN }}
docker-image-name: ${{ vars.DOCKER_IMAGE_NAME }}

update-proof-of-concept:
runs-on: ubuntu-latest
needs:
- build
- version
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
repository: nationalarchives/ds-etna-deployments-proof-of-concept
ref: main
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
- name: Set up git config
run: |
git config user.name "ds-search"
git config user.email "<>"
- name: Install jq
run: sudo apt-get install jq
- name: Update config
run: jq --indent 4 '(.services.search.version|="${{ needs.version.outputs.version }}")' config-aws-develop.json > tmp.$$.json && mv tmp.$$.json config-aws-develop.json
- name: Push new version
run: |
git add config-aws-develop.json
git commit -m "Update search to v${{ needs.version.outputs.version }}"
git push origin main
update-dblclk:
runs-on: ubuntu-latest
needs:
- build
- version
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
repository: nationalarchives/ds-etna
ref: proof-of-concept
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
- name: Set up git config
run: |
git config user.name "ds-search"
git config user.email "<>"
- name: Install yq
uses: dcarbone/install-yq-action@v1.1.1
- name: Update config
run: |
yq '(.services.search.image|="ghcr.io/${{ github.repository_owner }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ needs.version.outputs.version }}")' docker-compose.yml > tmp.$$.yml && mv tmp.$$.yml docker-compose.yml
- name: Push new version
run: |
git add docker-compose.yml
git commit -m "Update search to v${{ needs.version.outputs.version }}"
git push origin proof-of-concept

0 comments on commit 885e650

Please sign in to comment.