Bump version #373
Workflow file for this run
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: Docker | |
on: [push] | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set env vars | |
run: | | |
echo DOCKER_PUSH=$([[ $GITHUB_REF == *"master"* ]] && echo "true" || echo "false") >> $GITHUB_ENV | |
echo VERSION_NUMBER=$(jq -r < package.json .version) >> $GITHUB_ENV | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Docker login | |
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
- name: Docker build | |
run: | | |
docker buildx build \ | |
--platform linux/amd64,linux/arm/v7 \ | |
--output "type=image,push=$DOCKER_PUSH" \ | |
--label "version=$VERSION_NUMBER" \ | |
--tag maxcanna/raiapi:latest \ | |
--file ./Dockerfile . |