Skip to content

add more image tags #34

add more image tags

add more image tags #34

Workflow file for this run

name: Docker Image CI
on:
workflow_dispatch:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: Install Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: late
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DH_LOGIN }}
password: ${{ secrets.DH_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Generate image metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
- name: Push container images tag (Alpine)
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
labels: ${{ steps.meta.outputs.labels }}
file: Dockerfile.alpine
tags: |
${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:latest
${{ github.repository }}:alpine
ghcr.io/${{ github.repository }}:alpine
- name: Push container images tag (Ubuntu)
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
push: true
labels: ${{ steps.meta.outputs.labels }}
file: Dockerfile.ubuntu
tags: |
${{ github.repository }}:lunar
ghcr.io/${{ github.repository }}:lunar
${{ github.repository }}:ubuntu
ghcr.io/${{ github.repository }}:ubuntu