diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 12314c9..1d65f8d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,24 +7,24 @@ on: push: branches: [ master ] +env: + REGISTRY: ghcr.io + jobs: build: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Login to DockerHub - uses: docker/login-action@v1 + - name: Checkout + uses: actions/checkout@v3 + - name: Log in to the Container registry + uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v4 with: push: true - file: Dockerfile - tags: elraro/rajoybot:latest + context: . + tags: ${{ env.REGISTRY }}/${{ github.repository }}:latest \ No newline at end of file