Update docker/build-push-action digest to 22cd91d #4961
This file contains 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: Test, build and publish | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
test-frontend: | |
runs-on: ubuntu-18.04 | |
timeout-minutes: 30 | |
env: | |
MONGODB_VERSION: 3.6.9 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile --cache-folder .yarncache | |
- run: yarn --cwd frontend run lint | |
- run: yarn --cwd frontend run frontend-test | |
env: | |
CI: true | |
test-backend: | |
runs-on: ubuntu-18.04 | |
timeout-minutes: 30 | |
env: | |
MONGODB_VERSION: 4.4.6 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile --cache-folder .yarncache | |
- run: yarn --cwd backend run lint | |
- run: yarn --cwd backend run backend-test | |
env: | |
CI: true | |
setup-build-publish: | |
needs: [ test-frontend, test-backend ] | |
name: Setup, Build, Publish | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# token: ${{ secrets.REPO_PERSONAL_TOKEN }} | |
fetch-depth: 0 | |
# Update Changelog | |
- name: Update Changelog | |
run: npm_config_yes=true npx auto-changelog | |
- name: Log in to the Container registry | |
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=sha | |
# type=schedule | |
# type=semver,pattern={{version}} | |
# type=semver,pattern={{major}}.{{minor}} | |
# type=semver,pattern={{major}} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@22cd91d73b32e7bedd19a4141e0a53a1ad41995b | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |