Skip to content

IAM: Handle s2s token request #5390

IAM: Handle s2s token request

IAM: Handle s2s token request #5390

Workflow file for this run

---
name: 'E2E tests'
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
- 'V*'
jobs:
e2e-test:
permissions:
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setting git SHA to PR head
if: ${{ github.event_name == 'pull_request' }}
run: echo "SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
- name: Setting git SHA to branch head
if: ${{ github.event_name != 'pull_request' }}
run: echo "SHA=${{ github.sha }}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
if: ${{ github.actor != 'dependabot' }}
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
tags: ghcr.io/nuts-foundation/nuts-node-ci:${{ env.SHA }}
secrets: |
GIT_AUTH_TOKEN=${{ secrets.PACKAGE_SECRET }}
- name: Build and push dependabot
uses: docker/build-push-action@v5
if: ${{ github.actor == 'dependabot' }}
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
tags: ghcr.io/nuts-foundation/nuts-node-ci:${{ env.SHA }}
- name: Run E2E tests
run: |
cd e2e-tests && \
find . -type f -name "docker-compose.yml" | xargs -I{} sed -i 's~nutsfoundation/nuts-node:master~ghcr.io/nuts-foundation/nuts-node-ci:${{ env.SHA }}~g' {} && \
find . -type f -name "run-test.sh" | xargs -I{} sed -i 's/docker-compose exec/docker-compose exec -T/g' {} && \
./run-tests.sh
- name: package cleanup
uses: bots-house/[email protected]
if: ${{ github.actor != 'dependabot' }}
with:
owner: nuts-foundation
name: nuts-node-ci
# NOTE: using Personal Access Token
token: ${{ secrets.PACKAGE_SECRET }}
tag: ${{ env.SHA }}
- name: package cleanup dependabot
uses: bots-house/[email protected]
if: ${{ github.actor == 'dependabot' }}
with:
owner: nuts-foundation
name: nuts-node-ci
# NOTE: using Personal Access Token
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.SHA }}