diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index af04d2fc..bfd01e77 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -16,12 +16,16 @@ jobs: contents: read packages: write steps: + # Fetch the code - name: Checkout repository uses: actions/checkout@v2 + # Build the image from default Dockerfile - name: Build image run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" + # Login into GH container registry - name: Log in to registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + # Push build image - name: Push image run: | IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME