Skip to content

Commit

Permalink
chore: update snapshot workflow (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
kzantow authored Apr 6, 2023
1 parent 642f63c commit 9cf3dcd
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/update-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,33 @@ jobs:
update-snapshots:
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/update-snapshots') }}
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Generate token
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.TOKEN_APP_ID }}
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }}
- name: Add seen reaction
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ github.event.comment.id }}
reactions: eyes
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ steps.generate-token.outputs.token }}
- name: Build images
run: |
for distro in alpine centos debian; do
docker build -t localhost:5000/match-coverage/$distro ./tests/fixtures/image-$distro-match-coverage
docker push localhost:5000/match-coverage/${distro}:latest
done
- name: Update snapshots
run: |
# install husky hooks and dependencies:
Expand All @@ -29,3 +45,8 @@ jobs:
git config --global user.email '[email protected]'
git commit -s -am "chore(test): update snapshots"
git push
- name: Add success reaction
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ github.event.comment.id }}
reactions: +1

0 comments on commit 9cf3dcd

Please sign in to comment.