From 9cf3dcd57360c02651d5991ddaf59a311d187933 Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Thu, 6 Apr 2023 10:32:53 -0400 Subject: [PATCH] chore: update snapshot workflow (#410) --- .github/workflows/update-snapshots.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/update-snapshots.yml b/.github/workflows/update-snapshots.yml index c90c8071..15b14117 100644 --- a/.github/workflows/update-snapshots.yml +++ b/.github/workflows/update-snapshots.yml @@ -6,6 +6,11 @@ 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 @@ -13,10 +18,21 @@ jobs: 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: @@ -29,3 +45,8 @@ jobs: git config --global user.email 'anchore-actions@users.noreply.github.com' 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