diff --git a/.github/workflows/docker-image-beta.yml b/.github/workflows/docker-image-beta.yml index a96a82b..e3910c0 100644 --- a/.github/workflows/docker-image-beta.yml +++ b/.github/workflows/docker-image-beta.yml @@ -10,14 +10,41 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set up Docker metadata + id: meta + uses: docker/metadata-action@v3 + with: + images: | + aunefyren/wrapperr + ghcr.io/${{ github.repository_owner }}/wrapperr + tags: | + type-raw,value=beta + flavor: | + latest=true + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: arm64 + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 - name: Login to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v3 with: + builder: ${{ steps.buildx.outputs.name }} + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 push: true context: . - tags: aunefyren/wrapperr:beta \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }} \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f0c3ed9..2b8578f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -10,15 +10,42 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set up Docker metadata + id: meta + uses: docker/metadata-action@v3 + with: + images: | + aunefyren/wrapperr + ghcr.io/${{ github.repository_owner }}/wrapperr + tags: | + type-raw,value=${{ github.ref_name }} + flavor: | + latest=true + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: arm64 + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 - name: Login to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} registry: docker.io + - name: Login to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v3 with: + builder: ${{ steps.buildx.outputs.name }} + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 push: true context: . - tags: aunefyren/wrapperr:latest, aunefyren/wrapperr:${{ github.ref_name }} \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e28a0c5..ddf792f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ WORKDIR /app COPY . . -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build +RUN CGO_ENABLED=0 go build EXPOSE ${port}