1
0
Fork 0
mirror of https://github.com/lineageos4microg/docker-lineage-cicd synced 2024-06-10 10:46:06 +02:00
docker-lineage-cicd/.github/workflows/docker.yml
dependabot[bot] ed18a14dcd
Bump docker/metadata-action from 3.4.1 to 3.5.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](8b842e721d...3a3bb3a817)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-20 13:14:46 +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@f054a8b539a109f9f41c372932f1ae047eff08c9
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@3a3bb3a81753dc99f090d24ee7e5343838b73a96
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@1bc1040caef9e604eb543693ba89b5bf4fc80935
with:
context: .
push: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/pull') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}