Skip to content

Bump docker/login-action from 3.1.0 to 3.3.0 in /.github/workflows #202

Bump docker/login-action from 3.1.0 to 3.3.0 in /.github/workflows

Bump docker/login-action from 3.1.0 to 3.3.0 in /.github/workflows #202

Workflow file for this run

---
name: Docker build image
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
push:
branches:
- main
paths:
- 'Dockerfile'
- '.github/workflows/docker build.yml'
- 'Modules/*'
pull_request:
branches:
- main
paths:
- 'Dockerfile'
- '.github/workflows/docker build.yml'
- 'Modules/*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: fc_powershell
JUST_IMAGE_NAME: fc_powershell
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Log in to the Github Container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
username: bmcclure89
password: ${{ secrets.DOCKERHUB_TOKEN }}
if: github.ref == 'refs/heads/main'
- name: Extract metadata (tags, labels) for Docker
id: meta_github
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
with:
tags: |
type=ref,event=pr
type=ref,event=branch
type=sha,format=long
type=raw,value=latest
images: |
ghcr.io/brandonmcclure/${{ env.IMAGE_NAME }}
- name: Extract metadata (tags, labels) for Docker
id: meta_dockerhub
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
with:
tags: |
type=ref,event=pr
type=ref,event=branch
type=sha,format=long
type=raw,value=latest
images: |
bmcclure89/${{ env.JUST_IMAGE_NAME }}
if: github.ref == 'refs/heads/main'
- name: Build Docker image (non main branch)
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445
if: github.ref != 'refs/heads/main'
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta_github.outputs.tags }}
labels: ${{ steps.meta_github.outputs.labels }}
- name: Build and push Docker image (main branch)
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445
if: github.ref == 'refs/heads/main'
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta_dockerhub.outputs.tags }}
labels: ${{ steps.meta_dockerhub.outputs.labels }}
- name: Build and push Docker image (main branch)
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445
if: github.ref == 'refs/heads/main'
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta_github.outputs.tags }}
labels: ${{ steps.meta_github.outputs.labels }}