fix: Improve form accessibility: add explicit id/for associations to inputs #38
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Survey to Dev (GitOps) | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| cache: true | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install templ | |
| run: go install github.com/a-h/templ/cmd/templ@latest | |
| - name: Install dependencies | |
| run: go mod download | |
| - name: Build frontend | |
| run: cd web && npm ci && npm run build | |
| - name: Generate templates | |
| run: templ generate | |
| - name: Run tests | |
| run: go test -v -race -coverprofile=coverage.out ./... | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: coverage.out | |
| build-pr: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| needs: [test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ vars.AWS_REGION || 'us-east-1' }} | |
| - name: Login to Amazon ECR | |
| id: login-ecr | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| with: | |
| mask-password: true | |
| - name: Build and push PR image | |
| env: | |
| ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
| ECR_REPOSITORY: openmeet-ecr/survey | |
| IMAGE_TAG: pr-${{ github.event.pull_request.number }} | |
| run: | | |
| echo "Building PR image: $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" | |
| docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . | |
| docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| outputs: | |
| image_tag: ${{ steps.set-outputs.outputs.image_tag }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ vars.AWS_REGION || 'us-east-1' }} | |
| - name: Login to Amazon ECR | |
| id: login-ecr | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| with: | |
| mask-password: true | |
| - name: Set image tag | |
| id: set-outputs | |
| run: | | |
| echo "IMAGE_TAG=${{ github.sha }}" >> $GITHUB_ENV | |
| echo "image_tag=${{ github.sha }}" >> $GITHUB_OUTPUT | |
| - name: Build, tag, and push image to Amazon ECR | |
| env: | |
| ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
| ECR_REPOSITORY: openmeet-ecr/survey | |
| GIT_REVISION: ${{ github.sha }} | |
| GIT_BRANCH: ${{ github.ref_name }} | |
| run: | | |
| echo "Building image with tag: $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" | |
| docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . | |
| docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | |
| # Tag as latest for main branch | |
| docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:latest | |
| docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest | |
| gitops-update: | |
| needs: [build-and-deploy] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: ./.github/workflows/update-image-gitops.yml | |
| with: | |
| service_name: survey | |
| image_tag: ${{ needs.build-and-deploy.outputs.image_tag }} | |
| environment: dev | |
| ecr_registry: 433321780850.dkr.ecr.us-east-1.amazonaws.com | |
| ecr_repository: openmeet-ecr/survey | |
| commit_message: "GitOps: Update Survey to ${{ needs.build-and-deploy.outputs.image_tag }} from main branch" | |
| secrets: | |
| GH_PAT: ${{ secrets.GH_PAT_INFRASTRUCTURE }} |