Skip to content

Switch from Docker to Quay #2

Switch from Docker to Quay

Switch from Docker to Quay #2

Workflow file for this run

name: docker
on:
push:
branches:
- "**"
tags:
- "*.*.*"
- "*.*"
pull_request:
branches:
- "master"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
ioeari/iotagent-lora
# generate Docker tags based on the following events/attributes
tags: |
type=edge,branch=master
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build dev
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile-dev
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: docker
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}