Bump github.com/elazarl/goproxy in /proxy #398
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dotnet6 | |
on: | |
push: | |
paths: | |
- "samples/dotnet6/**" | |
- ".github/workflows/dotnet6.yml" | |
- "restarter/**" | |
schedule: | |
- cron: '0 7 * * *' | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: miracl/oidc-samples/samples/dotnet6 | |
DOCKER_BUILD_CONTEXT: samples/dotnet6 | |
SAMPLE_IMAGE: ghcr.io/miracl/oidc-samples/samples/dotnet6:${{ github.sha }} | |
PROXY_IMAGE: ghcr.io/miracl/oidc-samples/proxy:latest | |
TESTS_IMAGE: ghcr.io/miracl/oidc-samples/integration-tests:latest | |
CLIENT_ID: ${{ vars.CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
PROJECT_ID: ${{ vars.PROJECT_ID }} | |
jobs: | |
lint-dotnet6: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: "6.0" | |
- name: .NET Core lint | |
run: dotnet build samples/dotnet6/OidcSample.csproj | |
build-docker: | |
needs: lint-dotnet6 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: docker/setup-buildx-action@v1 | |
- uses: docker/login-action@v1 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
flavor: | | |
latest=${{ github.ref == 'refs/heads/master' }} | |
tags: | | |
type=raw,value=${{ github.sha }} | |
- uses: docker/build-push-action@v2 | |
with: | |
context: ${{ env.DOCKER_BUILD_CONTEXT }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
run-integration-tests: | |
needs: build-docker | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull images | |
run: | | |
docker pull --quiet $SAMPLE_IMAGE | |
docker pull --quiet $TESTS_IMAGE | |
- name: Start the sample | |
run: docker run | |
--detach | |
--network host | |
--publish 8000 | |
--env CLIENT_ID | |
--env CLIENT_SECRET | |
$SAMPLE_IMAGE | |
- name: Sleep for a seconds | |
run: sleep 1s | |
shell: bash | |
- name: Run integration tests | |
run: docker run | |
--network host | |
$TESTS_IMAGE | |
--client-id $CLIENT_ID | |
--client-secret $CLIENT_SECRET | |
--project-id $PROJECT_ID | |
run-integration-tests-with-proxy: | |
needs: build-docker | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull images | |
run: | | |
docker pull --quiet $PROXY_IMAGE | |
docker pull --quiet $SAMPLE_IMAGE | |
docker pull --quiet $TESTS_IMAGE | |
- name: Start the proxy | |
run: docker run | |
--detach | |
--network host | |
--publish 8080 | |
$PROXY_IMAGE | |
- name: Checkout repository content | |
uses: actions/checkout@v2 | |
- name: Run the restarter | |
run: go run ./restarter/main.go & | |
- name: Start the sample | |
run: docker run | |
--detach | |
--network host | |
--publish 8080 | |
--name sample | |
--env CLIENT_ID | |
--env CLIENT_SECRET | |
--env PROXY_HOST=127.0.0.1 | |
--env PROXY_PORT=8080 | |
$SAMPLE_IMAGE | |
- name: Sleep for a seconds | |
run: sleep 1s | |
shell: bash | |
- name: Run integration tests | |
run: docker run | |
--network host | |
$TESTS_IMAGE | |
--client-id $CLIENT_ID | |
--client-secret $CLIENT_SECRET | |
--project-id $PROJECT_ID | |
--sample-name sample | |
--proxy-host 127.0.0.1 | |
--proxy-port 8080 | |
--skip-modify-tests false |