Newer
Older
paths-ignore: [ "terraform/**" ]
paths-ignore: [ "terraform/**" ]
env:
REGISTRY: rg.fr-par.scw.cloud/knot-dots
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
- run: npm clean-install
- run: npx playwright install --with-deps
- run: npx playwright test
- uses: actions/upload-artifact@v3
if: failure()
with:
name: test-results
path: test-results/
retention-days: 7
needs: [ test ]
strategy:
matrix:
username: nologin
password: ${{ secrets.SCW_SECRET_KEY }}
- uses: docker/build-push-action@v5
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ matrix.image }}:latest
file: docker/${{ matrix.image }}/Dockerfile
push: ${{ github.event_name == 'push' }}
${{ env.REGISTRY }}/${{ matrix.image }}:${{ github.sha }}
${{ env.REGISTRY }}/${{ matrix.image }}:latest
update:
needs: [ build ]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- run: |
echo 'strategytool_image = "${{ env.REGISTRY }}/strategytool:${{ github.sha }}"' > ./terraform/dev/terraform.tfvars
echo 'keycloak_image = "${{ env.REGISTRY }}/keycloak:${{ github.sha }}"' >> ./terraform/dev/terraform.tfvars
echo 'migrate_image = "${{ env.REGISTRY }}/migrate:${{ github.sha }}"' >> ./terraform/dev/terraform.tfvars
git config --global user.name actions-user
git config --global user.email actions@github.com
git commit -am "Update image tag"
git push