الملفات
github-actions-demos/.github/workflows/docker-image.yml
dependabot[bot] dde8c0e7fa Bump docker/login-action from 2 to 3
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 22:30:41 +00:00

39 أسطر
832 B
YAML

name: Docker Image CI
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'container-example/**'
pull_request:
branches: [ main ]
paths:
- 'container-example/**'
defaults:
run:
working-directory: containers-example
jobs:
build:
environment: docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: container-example
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/static-site:latest
${{ secrets.DOCKER_USERNAME }}/static-site:${{ github.sha }}