الملفات
github-actions-demos/.github/workflows/docker-image.yml
dependabot[bot] 33b7be97f2 Bump actions/checkout from 2 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 16:05:01 +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@v2
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 }}