diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index 93756ca..5aac309 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -4,7 +4,7 @@ on: delete jobs: clean: - uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/clean_workflow.yml@main + uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/clean_workflow.yml@bc-6589 with: branch: ${{ github.event.ref }} secrets: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ff4de29..5d2c890 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -26,7 +26,7 @@ jobs: type=sha,enable=true,priority=600,prefix= - name: Log into registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -52,23 +52,36 @@ jobs: tags: ghcr.io/${{ github.repository }}:${{ github.sha }} labels: ${{ steps.docker_meta_img.outputs.labels }} - branch_name: + branch_meta: runs-on: ubuntu-latest outputs: - branch: ${{ steps.extract_branch.outputs.branch }} + branch: ${{ steps.extract_branch_meta.outputs.branch }} + sha: ${{ steps.extract_branch_meta.outputs.sha }} steps: - - name: Extract branch name + - name: Extract branch meta shell: bash - run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT - id: extract_branch + id: extract_branch_meta + env: + PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} + PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + BRANCH_REF_NAME: ${{ github.ref_name}} + BRANCH_SHA: ${{ github.sha }} + run: | + if [ "${{ github.event_name }}" == 'pull_request' ]; then + echo "branch=$PR_HEAD_REF" >> $GITHUB_OUTPUT + echo "sha=$PR_HEAD_SHA" >> $GITHUB_OUTPUT + else + echo "branch=$BRANCH_REF_NAME" >> $GITHUB_OUTPUT + echo "sha=$BRANCH_SHA" >> $GITHUB_OUTPUT + fi deploy: needs: - build_and_push - - branch_name - uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/deploy.yml@main + - branch_meta + uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/deploy.yml@bc-6589 with: - branch: ${{ needs.branch_name.outputs.branch }} + branch: ${{ needs.branch_meta.outputs.branch }} secrets: token: ${{ secrets.GITHUB_TOKEN }} DEV_VAULT_BRB: ${{ secrets.DEV_VAULT_BRB }} @@ -90,7 +103,7 @@ jobs: trivy-vulnerability-scanning: needs: - build_and_push - - branch_name + - branch_meta runs-on: ubuntu-latest permissions: actions: read @@ -98,7 +111,7 @@ jobs: security-events: write steps: - name: run trivy vulnerability scanner - uses: aquasecurity/trivy-action@9ab158e8597f3b310480b9a69402b419bc03dbd5 + uses: aquasecurity/trivy-action@1f6384b6ceecbbc6673526f865b818a2a06b07c9 with: image-ref: 'ghcr.io/${{ github.repository }}:${{ github.sha }}' format: 'sarif' @@ -107,6 +120,6 @@ jobs: ignore-unfixed: true - name: upload trivy results if: ${{ always() }} - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: 'trivy-results.sarif' diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 9009216..7cf3620 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -25,13 +25,13 @@ jobs: type=semver,pattern={{major}}.{{minor}} - name: Log into docker registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - name: Log into quay registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/h5p-staticfiles-server.iml b/.idea/h5p-staticfiles-server.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/h5p-staticfiles-server.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a8700e8 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file