1
0
mirror of https://github.com/lineageos4microg/docker-lineage-cicd synced 2024-09-20 00:12:55 +02:00
docker-lineage-cicd/.github/workflows/docker.yml
dependabot[bot] 2f722a108b
Bump docker/build-push-action from 2.7.0 to 2.8.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](a66e35b9cb...1814d3dfb3)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-19 13:15:15 +00:00

54 lines
1.7 KiB
YAML

name: Docker
on:
schedule:
- cron: '20 5 * * 1'
push:
pull_request:
env:
REGISTRY: docker.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/pull')
uses: docker/login-action@42d299face0c5c43a0487c477f595ac9cf22f1a7
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@e5622373a38e60fb6d795a4421e56882f2d7a681
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: latest=${{ github.ref == 'refs/heads/master' }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@1814d3dfb36d6f84174e61f4a4b05bd84089a4b9
with:
context: .
push: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/pull') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}