Skip to content

Commit

Permalink
Update the publish.yml template (#19)
Browse files Browse the repository at this point in the history
* Update the publish.yml template

metadata-action

* Bump docker/build-push-action@v3 to v4
  • Loading branch information
sinsukehlab authored Feb 24, 2023
1 parent ec12d95 commit 363a4ec
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,27 @@ We'll start by creating the workflow file to publish a Docker image to GitHub Pa
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
# Add your test steps here if needed...
- name: Build container
uses: docker/build-push-action@v1
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/YOURNAME/publish-packages/game
tags: type=sha
- name: Login to GHCR
uses: docker/login-action@v2
with:
username: YOURNAME
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
repository: YOURNAME/publish-packages/game
tag_with_sha: true
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
```
1. Replace `YOURNAME` with your username.
1. Commit your changes.
Expand Down

0 comments on commit 363a4ec

Please sign in to comment.