diff --git a/.dockerignore b/.dockerignore index f9d63b2..47b430b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,3 @@ .github main -delete-from-enterprise +sync-enterprise diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02805b1..6274895 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v4 - name: Build the Docker image - run: docker build . --file Dockerfile --tag ghcr.io/prodyna/delete-from-enterprise:latest + run: docker build . --file Dockerfile --tag ghcr.io/prodyna/sync-enterprise:latest # if tag, get the tag as variable - name: Get tag if available @@ -33,12 +33,12 @@ jobs: # Push latest to GitHub Container Registry - name: Push the latest Docker image to the GitHub Container Registry - run: docker push ghcr.io/prodyna/delete-from-enterprise:latest + run: docker push ghcr.io/prodyna/sync-enterprise:latest # if tagged, push the image to the GitHub Container Registry - name: Tag with git tag and push to GitHub Container Registry # only if it is a tag if: startsWith(github.ref, 'refs/tags/v') run: | - docker tag ghcr.io/prodyna/delete-from-enterprise:latest ghcr.io/prodyna/delete-from-enterprise:${{ env.tag }} - docker push ghcr.io/prodyna/delete-from-enterprise:${{ env.tag }} + docker tag ghcr.io/prodyna/sync-enterprise:latest ghcr.io/prodyna/sync-enterprise:${{ env.tag }} + docker push ghcr.io/prodyna/sync-enterprise:${{ env.tag }} diff --git a/.gitignore b/.gitignore index 97268bb..ddbc60f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .idea/ main .env -delete-from-enterprise +sync-enterprise diff --git a/Dockerfile b/Dockerfile index 44202ae..8491c63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ FROM golang:1.22.3-alpine3.19 as build WORKDIR /app COPY . . RUN go mod download -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o delete-from-enterprise . +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o sync-enterprise . FROM alpine:3.19.1 -COPY --from=build /app/delete-from-enterprise /app/ +COPY --from=build /app/sync-enterprise /app/ # COPY /template /template -ENTRYPOINT ["/app/delete-from-enterprise"] +ENTRYPOINT ["/app/sync-enterprise"] diff --git a/action.yaml b/action.yaml index 1822855..1d510c0 100644 --- a/action.yaml +++ b/action.yaml @@ -30,7 +30,7 @@ inputs: required: true runs: using: 'docker' - image: 'docker://ghcr.io/prodyna/delete-from-enterprise:v1.0.0' + image: 'docker://ghcr.io/prodyna/sync-enterprise:v1.0.0' env: GITHUB_TOKEN: ${{ inputs.github-token }} GITHUB_ENTERPRISE: ${{ inputs.github-enterprise }} diff --git a/go.mod b/go.mod index 8c70083..6551647 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/prodyna/delete-from-enterprise +module github.com/prodyna/sync-enterprise go 1.22.3 diff --git a/go.sum b/go.sum index c2ca230..fa2a103 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,6 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqb github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2/go.mod h1:aiYBYui4BJ/BJCAIKs92XiPyQfTaBWqvHujDwKb6CBU= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.7.0 h1:rTfKOCZGy5ViVrlA74ZPE99a+SgoEE2K/yg3RyW9dFA= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.7.0/go.mod h1:4OG6tQ9EOP/MT0NMjDlRzWoVFxfu9rN9B2X+tlSVktg= github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 h1:jBQA3cKT4L2rWMpgE7Yt3Hwh2aUj8KXjIGLxjHeYNNo= github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0/go.mod h1:4OG6tQ9EOP/MT0NMjDlRzWoVFxfu9rN9B2X+tlSVktg= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= @@ -13,8 +11,6 @@ github.com/cjlapao/common-go v0.0.39/go.mod h1:M3dzazLjTjEtZJbbxoA5ZDiGCiHmpwqW9 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -42,8 +38,6 @@ github.com/microsoft/kiota-abstractions-go v1.6.0 h1:qbGBNMU0/o5myKbikCBXJFohVCF github.com/microsoft/kiota-abstractions-go v1.6.0/go.mod h1:7YH20ZbRWXGfHSSvdHkdztzgCB9mRdtFx13+hrYIEpo= github.com/microsoft/kiota-authentication-azure-go v1.0.2 h1:tClGeyFZJ+4Bakf8u0euPM4wqy4ethycdOgx3jyH3pI= github.com/microsoft/kiota-authentication-azure-go v1.0.2/go.mod h1:aTcti0bUJEcq7kBfQG4Sr4ElvRNuaalXcFEu4iEyQ6M= -github.com/microsoft/kiota-http-go v1.3.3 h1:FKjK5BLFONu5eIBxtrkirkixFQmcPwitZ8iwZHKbESo= -github.com/microsoft/kiota-http-go v1.3.3/go.mod h1:IWw/PwtBs/GYz+Pa75gPW7MFNFv0aKPFsLw5WqzL1SE= github.com/microsoft/kiota-http-go v1.4.1 h1:zR54JahUOcu8h9C5z00fcQChzX8d01+BwhkTS8H16Ro= github.com/microsoft/kiota-http-go v1.4.1/go.mod h1:Kup5nMDD3a9sjdgRKHCqZWqtrv3FbprjcPaGjLR6FzM= github.com/microsoft/kiota-serialization-form-go v1.0.0 h1:UNdrkMnLFqUCccQZerKjblsyVgifS11b3WCx+eFEsAI= @@ -72,16 +66,10 @@ github.com/std-uritemplate/std-uritemplate/go v0.0.57 h1:GHGjptrsmazP4IVDlUprssi github.com/std-uritemplate/std-uritemplate/go v0.0.57/go.mod h1:rG/bqh/ThY4xE5de7Rap3vaDkYUT76B0GPJ0loYeTTc= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= diff --git a/main.go b/main.go index 6feda88..72d447c 100644 --- a/main.go +++ b/main.go @@ -2,11 +2,11 @@ package main import ( "context" - "github.com/prodyna/delete-from-enterprise/azure" - "github.com/prodyna/delete-from-enterprise/config" - "github.com/prodyna/delete-from-enterprise/github" - "github.com/prodyna/delete-from-enterprise/meta" - "github.com/prodyna/delete-from-enterprise/sync" + "github.com/prodyna/sync-enterprise/azure" + "github.com/prodyna/sync-enterprise/config" + "github.com/prodyna/sync-enterprise/github" + "github.com/prodyna/sync-enterprise/meta" + "github.com/prodyna/sync-enterprise/sync" "log/slog" "os" ) diff --git a/sync/sync.go b/sync/sync.go index 760de46..f92f555 100644 --- a/sync/sync.go +++ b/sync/sync.go @@ -2,8 +2,8 @@ package sync import ( "context" - "github.com/prodyna/delete-from-enterprise/azure" - "github.com/prodyna/delete-from-enterprise/github" + "github.com/prodyna/sync-enterprise/azure" + "github.com/prodyna/sync-enterprise/github" "log/slog" )