Skip to content

Bump docker/build-push-action from 4.1.1 to 4.2.1 #587

Bump docker/build-push-action from 4.1.1 to 4.2.1

Bump docker/build-push-action from 4.1.1 to 4.2.1 #587

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * 0'
jobs:
build_push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
id: prep
run: |
echo "tag=latest" >> $GITHUB_OUTPUT
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Lint Dockerfile
uses: docker://replicated/dockerfilelint:latest
with:
args: Dockerfile
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.10.0
- name: Login to DockerHub
uses: docker/login-action@v2.2.0
if: ${{ endsWith(github.ref, '/master') }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v4.2.1
with:
labels: |
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.source=${{ github.repositoryUrl }}
org.opencontainers.image.version=${{ steps.prep.outputs.tag }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=${{ github.event.repository.license.name }}
tags: haxorof/openstack-cli:${{ steps.prep.outputs.tag }}
push: ${{ endsWith(github.ref, '/master') }}
dependabot:
if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
needs: build_push
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1.6.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: ${{steps.dependabot-metadata.outputs.package-ecosystem == 'github_actions'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
update_docker_hub_description:
needs: build_push
runs-on: ubuntu-latest
if: ${{ endsWith(github.ref, '/master') }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: haxorof/openstack-cli