Fix Dockerfile, closes #112 #75
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: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
env: | |
CONTAINER_NAME: panamax-rs/panamax | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Test building image | |
run: docker build -t ${{ env.CONTAINER_NAME }}:test . | |
- name: Run the built image | |
run: docker run --rm ${{ env.CONTAINER_NAME }}:test | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: docker/setup-qemu-action@v1 | |
- uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and export to Docker | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
load: true | |
tags: ${{ env.TEST_TAG }} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: false | |
tags: ${{ env.CONTAINER_NAME }}:latest | |
... |