S3 store router updated to accomodate Scaleway Object Storage #21
This file contains hidden or 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: Docker Image CI | |
| on: | |
| release: | |
| types: [published] | |
| push: | |
| branches: | |
| - '*' | |
| tags: | |
| - '*' | |
| jobs: | |
| version: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| steps: | |
| - id: version | |
| name: Get and check version | |
| run: | | |
| export VERSION=$(echo $GITHUB_REF | sed -re 's/^.*\/([0-9a-zA-Z._-]+)$/\1/') | |
| echo "::set-output name=version::$VERSION" | |
| echo version is $VERSION | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - version | |
| env: | |
| DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./docker/Dockerfile-monolithic | |
| tags: ${{ env.DOCKER_USER }}/armadietto-monolithic:${{ needs.version.outputs.version }} | |
| outputs: type=docker,dest=/tmp/docker.tar | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docker | |
| path: /tmp/docker.tar | |
| sec_test: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - version | |
| - build | |
| env: | |
| DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: docker | |
| path: /tmp | |
| - name: Load docker image | |
| run: docker load --input /tmp/docker.tar | |
| - name: Run security tests | |
| continue-on-error: true | |
| run: | | |
| docker run --rm -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy image --exit-code 1 $DOCKER_USER/armadietto-monolithic:${{ needs.version.outputs.version }} | |
| #e2e_test: | |
| # runs-on: ubuntu-latest | |
| # needs: | |
| # - version | |
| # - build | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - name: Download artifacts | |
| # uses: actions/download-artifact@v4 | |
| # with: | |
| # name: docker | |
| # path: /tmp | |
| # - name: Load docker image | |
| # run: docker load --input /tmp/docker.tar | |
| publish: | |
| if: github.ref_type == 'tag' | |
| runs-on: ubuntu-latest | |
| needs: | |
| - version | |
| - sec_test | |
| #- e2e_test | |
| env: | |
| DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
| DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: docker | |
| path: /tmp | |
| - name: Load docker image | |
| run: docker load --input /tmp/docker.tar | |
| - name: Publish Docker image | |
| run: | | |
| docker login -u $DOCKER_USER -p $DOCKER_TOKEN | |
| docker push $DOCKER_USER/armadietto-monolithic:${{ needs.version.outputs.version }} | |
| docker tag $DOCKER_USER/armadietto-monolithic:${{ needs.version.outputs.version }} $DOCKER_USER/armadietto-monolithic | |
| docker push $DOCKER_USER/armadietto-monolithic |