

Quick Tip: GitHub Action for pushing docker images
source link: https://sj14.gitlab.io/post/2020/06-16-github-action-registry/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Quick Tip: GitHub Action for pushing docker images
2020-06-16Here is a full example of using the official Docker build-push-action for GitHub to publish directly to the registry of this repo. Just create a .github/workflows/docker.yaml
file in your repo with the following content:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
name: Publish Docker
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ github.token }}
registry: docker.pkg.github.com
repository: ${{ github.repository }}/image
tag_with_ref: true
tag_with_sha: true
add_git_labels: true
Of course, you need a valid Dockerfile
in your repo. Otherwise, there is no need to add anyting else, all ${{ github.X }}
variables are already set.
Recommend
-
21
Quick Tip: Simulate a bad network connection on macOS (and Linux)2020-06-19Yesterday, I got a tip from a colleague to fake a poor network connection (for debugging an issue) with tc (
-
14
Quick Tip - See All The Tab-Completion Options At Once In The PowerShell Console If you’re used to working in VS Code or the PowerShell ISE, you’ve undoubtedly enjoyed intellisense which is the feature that shows you all...
-
20
Quick Tip - Split A PowerShell Collection Into Two Arrays Did you know that you can use Where-Object to split a collection into two arrays? Like, if you had an array containing the numbers 1 to 10, you c...
-
13
Quick Tip - Re-Run The Last Command Sometimes, while you’re poking around in the console, you want to re-run the last command. Sure, you can hit the up arrow and enter, but PowerShell always gives you multiple ways to do...
-
7
Quick Tip - PowerShell Supports Partial Parameter Names Did you know that PowerShell supports the usage of partial parameter names? This isn’t such a big deal since tab completion is a thing… and if you’re writing code,...
-
9
Pushing Spring Boot 2 Docker images to Amazon ECR This post has been featured on http://www.baeldung.com/java-weekly-246. ...
-
8
-
6
3...
-
6
Quick tip: embedding YouTube Videos in GitHub pages Wednesday, September 14th, 2022 at 10:49 am
-
6
1. INTRODUCTION Google’s jib-maven-plugin,
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK