diff --git a/.github/workflows/release-build.yaml b/.github/workflows/release-build.yaml index 75e27d2..e3b13ba 100644 --- a/.github/workflows/release-build.yaml +++ b/.github/workflows/release-build.yaml @@ -12,11 +12,77 @@ jobs: permissions: contents: read packages: write + id-token: write steps: - uses: actions/checkout@v4 - # TODO actually build the container + # this sets us up to build and deploy to AWS ECR. you will still need to + # actually build the container and push it. you can use multiarch images + # with ECS and EKS/Kubernetes. however, AWS Lambda only likes single arch + # images. you will need to set "id-token: write" under permissions for this + # to work. + # + # - name: Configure AWS + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # aws-region: ${{ env.AWS_REGION }} + # role-to-assume: ${{ env.AWS_ROLE_ARN }} + # env: + # AWS_REGION: "us-east-1" + # AWS_ACCOUNT_ID: "arn:aws:iam::1234567890:role/myrole" + # + # - name: Login to Amazon ECR + # uses: aws-actions/amazon-ecr-login@v2 + + # this sets us up to build and deploy to GHCR. you will still need to + # actually build the container and push it. this will build a multiarch + # image which works great with ECS and EKS/Kubernetes but not AWS Lambda + # you will need to set "packages: write" under permissions for this to + # work. + # + # - name: Login to ghcr.io + # uses: docker/login-action@v3 + # with: + # registry: ghcr.io + # username: ${{ github.repository_owner }} + # password: ${{ secrets.GITHUB_TOKEN }} + + # this is an example of building a single arch image on a specific arch. + # this will work well with AWS Lambda. + # + # - name: Configure docker for multiarch builds + # uses: docker/setup-qemu-action@v3 + # with: + # platforms: "arm64" + # + # - name: Build and push container image + # run: | + # docker build -t $IMAGE_NAME:${{ github.ref_name }} -t $IMAGE_NAME:latest . + # docker image push --all-tags $IMAGE_NAME + # env: + # DEFAULT_DOCKER_PLATFORM: linux/arm64 + # IMAGE_NAME: 1234567890.dkr.ecr.us-east-1.amazonaws.com/myimage + + # this is an example of building a multiarch image on two archs. this + # will work on ECS or EKS/Kubernetes. note that multiarch images do not get + # along with GitHub's image expiration action so be careful. + # + # see: https://github.com/actions/delete-package-versions + # see: https://github.com/actions/delete-package-versions/issues/90 + # + # - name: Set up QEMU for docker multiarch builds + # uses: docker/setup-qemu-action@v3 + # + # - name: Set up docker buildx + # uses: docker/setup-buildx-action@v3 + # + # - name: Build and push container images + # run: | + # docker buildx build --push --platform $IMAGE_ARCH -t $IMAGE_NAME:${{ github.ref_name }} -t $IMAGE_NAME:latest . + # env: + # IMAGE_ARCH: linux/amd64,linux/arm64 + # IMAGE_NAME: ghcr.io/myaccount/myrepo - run: | echo "Finished building and pushing containers." diff --git a/.github/workflows/release-create.yaml b/.github/workflows/release-create.yaml index 763eb0b..b42e584 100644 --- a/.github/workflows/release-create.yaml +++ b/.github/workflows/release-create.yaml @@ -7,16 +7,20 @@ on: increment: description: "Set a field to increment." required: false + default: "" type: choice options: + - "" - MAJOR - MINOR - PATCH prerelease: description: "Set as a prerelease version." required: false + default: "" type: choice options: + - "" - alpha - beta - rc diff --git a/Makefile b/Makefile index c9a73d2..db732f7 100644 --- a/Makefile +++ b/Makefile @@ -52,12 +52,8 @@ clean: .PHONY: pre-commit pre-commit: - pre-commit install --hook-type commit-msg --hook-type pre-push --hook-type pre-commit - -.PHONY: bump -bump: - cz bump --changelog + pre-commit install .PHONY: bump-check bump-check: - cz bump --changelog --dry-run + cz bump --dry-run