mirror of
https://github.com/elgohr/Publish-Docker-Github-Action.git
synced 2026-03-12 18:07:12 -04:00
Add example for new actions format
This commit is contained in:
20
README.md
20
README.md
@@ -6,8 +6,26 @@ Hereby the master-branch is published as the latest-tag.
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
An example workflow:
|
### New workflow
|
||||||
|
```yaml
|
||||||
|
name: Publish Docker
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Login to Registry
|
||||||
|
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
- name: Publish to Registry
|
||||||
|
uses: elgohr/Publish-Docker-Github-Action@master
|
||||||
|
with:
|
||||||
|
args: myDocker/repository
|
||||||
|
- name: Logout
|
||||||
|
run: docker logout
|
||||||
|
```
|
||||||
|
|
||||||
|
### Old workflow
|
||||||
```hcl
|
```hcl
|
||||||
workflow "Publish Docker" {
|
workflow "Publish Docker" {
|
||||||
on = "push"
|
on = "push"
|
||||||
|
|||||||
Reference in New Issue
Block a user