Merge pull request #249 from uswitch/AIRSHIP-4059/snyk-vulnerabilities #44
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: push | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| ruby-version: 3.4.8 | |
| - run: rake spec | |
| build: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| ruby-version: 3.4.8 | |
| - run: rake version | |
| - run: rake build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: pkg | |
| path: pkg/ | |
| docker: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Login to Quay.io | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: pkg | |
| path: pkg/ | |
| - id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: quay.io/uswitch/terrafying-components | |
| tags: type=sha,prefix=,format=long, | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| labels: ${{ steps.meta.outputs.labels }} | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} |