From 92eafef7131ef10266464041ac472e8ecbe451d8 Mon Sep 17 00:00:00 2001 From: William Floyd Date: Sat, 8 Mar 2025 21:37:51 +0530 Subject: [PATCH] test --- .forgejo/workflows/demo.yml | 6 ------ .forgejo/workflows/publish.yml | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 6 deletions(-) delete mode 100644 .forgejo/workflows/demo.yml create mode 100644 .forgejo/workflows/publish.yml diff --git a/.forgejo/workflows/demo.yml b/.forgejo/workflows/demo.yml deleted file mode 100644 index d470cda..0000000 --- a/.forgejo/workflows/demo.yml +++ /dev/null @@ -1,6 +0,0 @@ -on: [push] -jobs: - test: - runs-on: docker - steps: - - run: echo All Good diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml new file mode 100644 index 0000000..a297a32 --- /dev/null +++ b/.forgejo/workflows/publish.yml @@ -0,0 +1,37 @@ +name: Create and publish a Docker image +on: + push: + branches: ['release'] +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} +jobs: + docker: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file