diff --git a/.github/workflows/docker-image-dev.yml b/.github/workflows/docker-image-dev.yml index 1e49a32..fd78722 100644 --- a/.github/workflows/docker-image-dev.yml +++ b/.github/workflows/docker-image-dev.yml @@ -2,7 +2,8 @@ name: Docker Image Dev on: push: - branches: [ dev ] + branches: + - 'dev' jobs: docker: @@ -14,33 +15,40 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Checkout + uses: actions/checkout@v3 + + # manager docker + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ github.actor }}/wifi_db + - name: Login to DockerHub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} + username: ${{ github.actor }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Checkout - uses: actions/checkout@v2 - - - name: Build and push + - name: Build and push docker id: docker_build uses: docker/build-push-action@v2 with: context: . + file: ./manager/Dockerfile + platforms: linux/amd64 push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/wifi_db:dev - - name: Login to GitHub Packages - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u ${{ github.actor }} docker.pkg.github.com --password-stdin + - name: Login to GitHub Container Registry + run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - name: Build and push github - id: docker_build_github + - name: Build and push docker + id: docker_build_ghcr uses: docker/build-push-action@v5 with: context: . + file: ./manager/Dockerfile platforms: linux/amd64 push: true - tags: hcr.io/${{ github.actor }}/wifi_db:dev - - + tags: ghcr.io/${{ github.actor }}/wifi_db:dev \ No newline at end of file