Editing Docker-publish.yml

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
 
https://github.com/actions/starter-workflows/blob/main/ci/docker-publish.yml
 
https://github.com/actions/starter-workflows/blob/main/ci/docker-publish.yml
 +
<pre>
 +
name: Docker
 +
 +
# This workflow uses actions that are not certified by GitHub.
 +
# They are provided by a third-party and are governed by
 +
# separate terms of service, privacy policy, and support
 +
# documentation.
 +
 +
on:
 +
  schedule:
 +
    - cron: $cron-daily
 +
  push:
 +
    branches: [ $default-branch ]
 +
    # Publish semver tags as releases.
 +
    tags: [ 'v*.*.*' ]
 +
  pull_request:
 +
    branches: [ $default-branch ]
 +
 +
env:
 +
  # Use docker.io for Docker Hub if empty
 +
  REGISTRY: ghcr.io
 +
  # github.repository as <account>/<repo>
 +
  IMAGE_NAME: ${{ github.repository }}
 +
 +
 +
jobs:
 +
  build:
 +
 +
    runs-on: ubuntu-latest
 +
    permissions:
 +
      contents: read
 +
      packages: write
 +
      # This is used to complete the identity challenge
 +
      # with sigstore/fulcio when running outside of PRs.
 +
      id-token: write
  
name: Docker
 
 
# This workflow uses actions that are not certified by GitHub.
 
# They are provided by a third-party and are governed by
 
# separate terms of service, privacy policy, and support
 
# documentation.
 
 
[[on:]]
 
  [[schedule:]]
 
    - cron: $cron-daily
 
  push:
 
    branches: [ $default-branch ]
 
    # Publish semver tags as releases.
 
    tags: [ 'v*.*.*' ]
 
  pull_request:
 
    branches: [ $default-branch ]
 
 
env:
 
  # Use docker.io for Docker Hub if empty
 
  REGISTRY: [[ghcr.io]]
 
  # github.repository as <account>/<repo>
 
  IMAGE_NAME: ${{ github.repository }}
 
 
 
jobs:
 
  build:
 
 
    runs-on: ubuntu-latest
 
    permissions:
 
      contents: read
 
      packages: write
 
      # This is used to complete the identity challenge
 
      # with sigstore/fulcio when running outside of PRs.
 
      id-token: write
 
 
 
     steps:
 
     steps:
 
       - name: Checkout repository
 
       - name: Checkout repository
 
         uses: actions/checkout@v3
 
         uses: actions/checkout@v3
+
 
       # Install the [[cosign]] tool except on PR
+
       # Install the cosign tool except on PR
 
       # https://github.com/sigstore/cosign-installer
 
       # https://github.com/sigstore/cosign-installer
       - name: Install [[cosign]]
+
       - name: Install cosign
 
         if: github.event_name != 'pull_request'
 
         if: github.event_name != 'pull_request'
 
         uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0
 
         uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0
 
         with:
 
         with:
 
           cosign-release: 'v1.13.1'
 
           cosign-release: 'v1.13.1'
 
+
 
+
 
 
       # Workaround: https://github.com/docker/build-push-action/issues/461
 
       # Workaround: https://github.com/docker/build-push-action/issues/461
 
       - name: Setup Docker buildx
 
       - name: Setup Docker buildx
 
         uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
 
         uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
+
 
 
       # Login against a Docker registry except on PR
 
       # Login against a Docker registry except on PR
 
       # https://github.com/docker/login-action
 
       # https://github.com/docker/login-action
Line 63: Line 63:
 
           username: ${{ github.actor }}
 
           username: ${{ github.actor }}
 
           password: ${{ secrets.GITHUB_TOKEN }}
 
           password: ${{ secrets.GITHUB_TOKEN }}
<pre>
+
 
 
       # Extract metadata (tags, labels) for Docker
 
       # Extract metadata (tags, labels) for Docker
 
       # https://github.com/docker/metadata-action
 
       # https://github.com/docker/metadata-action
Line 100: Line 100:
 
</pre>
 
</pre>
  
 
== Related ==
 
* <code>[[my-docker-publish.yml]]</code>
 
  
  
== See also ==
 
* {{GitHub Actions}}
 
  
[[Category:GitHub]]
+
{{GitHub Actions}}

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: