From c7bfb88bff8d2a75bbe1b2dd870c24f2c1789f9a Mon Sep 17 00:00:00 2001 From: Muhammad Gouda <128878992+mu-gouda@users.noreply.github.com> Date: Sat, 20 Apr 2024 12:30:26 +0200 Subject: [PATCH] Create publish.yml --- .github/workflows/publish.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..fd7a977 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Publish to Docker +on: + push: + branches: + - main +permissions: + packages: write + contents: read +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + # Add your test steps here if needed... + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/mu-gouda/publish-packages/game + tags: type=sha + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build container + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }}