From fb0a8c08a39dc59c4a5f7b4874397fb50ae868a9 Mon Sep 17 00:00:00 2001 From: Anas Elgarhy Date: Tue, 20 Feb 2024 12:38:01 +0200 Subject: [PATCH] ci(docker): create docker workflow --- .github/workflows/publish.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..ab27a09 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +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 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + image: ghcr.io/0x61nas/publish-packages/game + tags: type=sha + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ github.GITHUB_TOKEN }} + - name: Bulid container + uses: docker/bulid-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }}