diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml deleted file mode 100644 index 9089797..0000000 --- a/.github/workflows/build-image.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: Build and push image on PR - -on: - pull_request: - branches: - - main - -jobs: - build-and-push: - runs-on: ubuntu-latest - steps: - - name: cleanup disk space - run: | - sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc - df -h - - - name: Checkout files in repo - uses: actions/checkout@main - - - name: Set up QEMU (for docker buildx) - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx (for chartpress multi-arch builds) - uses: docker/setup-buildx-action@v3 - - - name: Setup push rights to Quay.io - run: | - docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io - - - name: Build the image and push to quay.io if not a pull request - uses: jupyterhub/repo2docker-action@master - with: - DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.QUAY_PASSWORD }} - DOCKER_REGISTRY: "quay.io" - LATEST_TAG_OFF: true - IMAGE_NAME: "2i2c-org/frx-challenges" - - - name: Show how much disk space is left - run: df -h diff --git a/.github/workflows/publish-chart.yaml b/.github/workflows/publish-chart.yaml index a371a3f..78d38ed 100644 --- a/.github/workflows/publish-chart.yaml +++ b/.github/workflows/publish-chart.yaml @@ -41,29 +41,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: "3.11" - - - name: Decide to publish or not - id: publishing - shell: python - run: | - import os - repo = "${{ github.repository }}" - event = "${{ github.event_name }}" - ref = "${{ github.event.ref }}" - publishing = "" - if ( - repo == "2i2c-org/frx-challenges" - and event == "push" - and ( - ref.startswith("refs/tags/") - or ref == "refs/heads/main" - ) - ): - publishing = "true" - print("Publishing chart") - with open(os.environ["GITHUB_OUTPUT"], "a") as f: - f.write(f"publishing={publishing}\n") + python-version: "3.12" - name: Set up QEMU (for docker buildx) uses: docker/setup-qemu-action@v3 @@ -71,10 +49,12 @@ jobs: - name: Set up Docker Buildx (for chartpress multi-arch builds) uses: docker/setup-buildx-action@v3 - - name: Setup push rights to Quay.io - if: steps.publishing.outputs.publishing - run: | - docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io + - name: Login to Quay.io + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} - name: Set up push rights to frx-challenges-helm-chart # This was setup by... @@ -86,7 +66,6 @@ jobs: # 3. Registering the public key (gh-pages.pub) as a deploy key # with push rights for the 2i2c-org/frx-challenges-helm-chart repo: # https://github.com/2i2c-org/frx-challenges-helm-chart/settings/keys - if: steps.publishing.outputs.publishing run: | mkdir -p ~/.ssh ssh-keyscan github.com >> ~/.ssh/known_hosts @@ -104,21 +83,13 @@ jobs: git config --global user.email "github-actions@github.com" git config --global user.name "github-actions" - - name: Build image, push if necessary - env: - PUBLISHING: ${{ steps.publishing.outputs.publishing }} + - name: Build image and push run: | - CHARTPRESS_ARGS="" - if [[ "${PUBLISHING}" == "true" ]]; then - CHARTPRESS_ARGS="--push" - fi chartpress \ --builder docker-buildx \ - --platform linux/amd64 --platform linux/arm64 \ - ${CHARTPRESS_ARGS} + --platform linux/amd64 --platform linux/arm64 - name: Publish chart with chartpress - if: steps.publishing.outputs.publishing run: | set -eux diff --git a/.gitignore b/.gitignore index 23ff20a..5f88199 100644 --- a/.gitignore +++ b/.gitignore @@ -163,3 +163,7 @@ cython_debug/ # MyST _build + +# VS Code +.DS_Store +.vscode/ diff --git a/frx_challenges/web/templates/version.html b/frx_challenges/web/templates/version.html index 211cbd6..63e7788 100644 --- a/frx_challenges/web/templates/version.html +++ b/frx_challenges/web/templates/version.html @@ -8,19 +8,26 @@
{{ version.filename }} {{ version.created_at|timesince }} ago
+ {{ version.user.username }} uploaded {{ version.filename }} {{ version.created_at|timesince }}
+ ago