Revert "atlasaction: in monitor schema action exclude revisions table… #424
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: Build and Upload to CDN | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| uses: ./.github/workflows/ci-go.yaml | |
| secrets: inherit | |
| release: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| outputs: | |
| status: ${{ steps.create-release.outputs.status }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3.0.2 | |
| - name: Setup Git for GitHub bot | |
| run: | | |
| git config --local user.name 'github-actions[bot]' | |
| git config --local user.email 'github-actions[bot]@users.noreply.github.com' | |
| shell: bash | |
| - name: Run Make Release | |
| id: create-release | |
| run: make release | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| build: | |
| needs: [release] | |
| if: ${{ needs.release.outputs.status == 'created' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| env: | |
| REGISTRY: "docker.io" | |
| IMAGE_NAME: "arigaio/atlas-action" | |
| DOCKERHUB_USERNAME: arigaio | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3.0.2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub (${{ env.REGISTRY }}) | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ env.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.RELEASE_AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.RELEASE_AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Setup Go Environment | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install tfx-cli | |
| run: npm install -g tfx-cli | |
| - name: Install Atlas | |
| uses: ariga/setup-atlas@v0 | |
| - name: Build assets | |
| run: make atlas-action test s3-upload docker DOCKER_IMAGE=$DOCKER_IMAGE azure-devops | |
| env: | |
| CGO_ENABLED: 0 | |
| AWS_REGION: us-east-1 | |
| DOCKER_IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Upload Azure DevOps Extension | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: azure-devops-extension | |
| path: .github/azure-devops/ariga.atlas-action-*.vsix | |
| # Run end-to-end test on the published binary. | |
| e2e-test: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: ariga/setup-atlas@v0 | |
| with: | |
| cloud-token: ${{ secrets.ATLAS_TOKEN }} | |
| - name: Run Migrate Lint | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| uses: jenseng/dynamic-uses@v1 | |
| with: | |
| uses: ariga/atlas-action/migrate/lint@v1 | |
| with: '{ | |
| "dir": "file://atlasaction/testdata/migrations", | |
| "dev-url": "sqlite://dev?mode=memory", | |
| "dir-name": "test-dir-sqlite" | |
| }' | |
| - name: Run Migrate Push | |
| uses: jenseng/dynamic-uses@v1 | |
| with: | |
| uses: ariga/atlas-action/migrate/push@v1 | |
| with: '{ | |
| "dir": "file://atlasaction/testdata/migrations", | |
| "dev-url": "sqlite://dev?mode=memory", | |
| "dir-name": "test-dir-sqlite" | |
| }' |