Skip to content

Bump github/codeql-action from 2 to 3 (#45) #35

Bump github/codeql-action from 2 to 3 (#45)

Bump github/codeql-action from 2 to 3 (#45) #35

Workflow file for this run

name: ci
on:
push:
branches:
- 'main'
tags:
- '*'
jobs:
docker:
runs-on: ubuntu-latest
environment: DockerHub
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
if: GitHub.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
uses: docker/metadata-action@v4
id: meta
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/yamlfix
tags: |
type=raw,value=latest,enable=${{ endsWith(GitHub.ref, 'main') }}
type=ref,event=tag
type=sha,enable=true,priority=100,prefix=,suffix=,format=short
flavor: |
latest=false
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
push: ${{ GitHub.event_name != 'pull_request' }}
context: .
file: Dockerfile
builder: ${{ steps.buildx.outputs.name }}
build-args: |
BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
VCS_REF=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64
provenance: false
images: ${{ secrets.DOCKERHUB_USERNAME }}/yamlfix