GithubHelp home page GithubHelp logo

soramitsukhmer / publish-docker-action Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 27 KB

Build and Publish Docker Container via action composition

License: MIT License

docker github-actions github-actions-docker docker-buildx docker-buildx-qemu docker-buildx-bake

publish-docker-action's Introduction

⚠️ Warning ⚠️

This action has been archived.
Please migrate to https://github.com/soramitsukhmer/docker-bake-action instead.

soramitsukhmer/publish-docker-action

This repository is considered EXPERIMENTAL and under active development until further notice. It is subject to non-backward compatible changes or removal in any future version so you should pin to a specific tag/commit of this action in your workflow (i.e soramitsukhmer/publish-docker-action@v1).

About

Build and Publish Docker Container via action composition that use Docker Buildx Bake as a high-level build command.

Usage

name: ci

on:
  schedule:
    # https://crontab.guru/#40_10_*_*_*
    - cron: "40 10 * * *"
  push:
    branches: [main]
    # Publish semver tags as releases.
    tags: ["v*.*.*"]
  pull_request:
    branches: [main]

env:
  # Use docker.io for Docker Hub if empty
  REGISTRY: ghcr.io
  # github.repository as <account>/<repo>
  IMAGE_NAME: ${{ github.repository }}

jobs:
  bake:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      # Login against a Docker registry
      # https://github.com/docker/login-action
      - name: Log into registry ${{ env.REGISTRY }}
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      # Build and push Docker image with Buildx Bake
      # https://github.com/soramitsukhmer/publish-docker-action
      - name: Build and push
        uses: soramitsukhmer/publish-docker-action@v1
        with:
          images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
          targets: build
          push: true

Customizing

Name Type
images List/CSV List of Docker images to use as base name for tags
targets List/CSV List of bake targets
push Bool Push to registry (default false)

Built-in actions

This action composition uses the following actions.

Keep up-to-date with GitHub Dependabot

Since Dependabot has native GitHub Actions support, to enable it on your GitHub repo all you need to do is add the .github/dependabot.yml file:

version: 2
updates:
  # Maintain dependencies for GitHub Actions
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "daily"

publish-docker-action's People

Contributors

socheatsok78 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.