記事:
記事:
Events will not be created if more than 5,000 branches are pushed at once. Events will not be created for tags when more than three tags are pushed at once.
代案:
on: workflow_dispatch: inputs: tag_name: description: '実行対象のタグ名' required: true type: string jobs: release: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 with: ref: ${{ inputs.tag_name }} # 以降、リリース処理など
TAGS=(v1.0.1 v1.0.2 v1.0.3 v1.0.4 v1.0.5) for tag in "${TAGS[@]}"; do git push origin "$tag" gh workflow run release-pipeline.yml -f tag_name="$tag" done
run: echo "Validating PR title: ${{ github.event.pull_request.title }}"
記事:
記事:
run-name: Deploy to ${{ inputs.deploy_target }} by @${{ github.actor }}記事:
承認ワークフローを入れる:
例:
jobs: deploy: runs-on: ubuntu-latest environment: name: ${{ github.event.inputs.project == 'prod' && 'production' || 'development' }}
記事:
- runs-on: ubuntu-latest + runs-on: nscloud-ubuntu-24.04-amd64-4x8
記事:
- runs-on: ubuntu-latest + runs-on: blacksmith-4vcpu-ubuntu-2404
ビルドの高速化:
記事:
記事:
記事
記事:
記事:
jobs: dump_contexts_to_log: runs-on: ubuntu-latest steps: - name: Dump GitHub context env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - name: Dump job context env: JOB_CONTEXT: ${{ toJson(job) }} run: echo "$JOB_CONTEXT"
記事:
name: Build docker image for ECR on: push: paths: - "build/**" branches: - main tags: - "example-*" env: IMAGE_NAME: example REPO_IMAGE: org/${{ env.IMAGE_NAME }} PLATFORMS: linux/amd64,linux/arm64 permissions: id-token: write contents: read defaults: run: working-directory: build jobs: build: runs-on: ubuntu-latest # example-0.0.1 tag 付けてpushした時のみ実行 if: startsWith(github.ref, 'refs/tags/${{ env.IMAGE_NAME }}-') steps: - name: Checkout code uses: actions/checkout@v4 - name: Configure AWS credentials thru OIDC for ECR uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: arn:aws:iam::123456789012:role/oidc-github-myorg-build aws-region: ap-northeast-1 audience: https://github.com/myorg role-duration-seconds: 900 role-skip-session-tagging: true - name: Login to ECR uses: aws-actions/amazon-ecr-login@v2 - name: Docker meta id: docker_meta uses: docker/metadata-action@v5 with: images: ${{ vars.AWS_ECR_REPO_URL }}/${{ env.REPO_IMAGE }} tags: type=match,pattern=${{ env.IMAGE_NAME }}-(.*),group=1 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and push uses: docker/build-push-action@v6 with: context: ./notebook file: ./Dockerfile push: ${{ contains(github.ref, 'refs/tags/${{ env.IMAGE_NAME }}-') }} tags: ${{ steps.docker_meta.outputs.tags }} provenance: false platforms: ${{ env.PLATFORMS }} labels: ${{ steps.meta.outputs.labels }}
ubuntu-slim:
記事: