mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2025-08-10 10:49:26 +00:00
Add action to push alpine images to Docker Hub
Add a GitHub action to push alpine images with curl-impersonate to Docker Hub whenever a new release tag is created.
This commit is contained in:
42
.github/workflows/publish-docker-image.yml
vendored
Normal file
42
.github/workflows/publish-docker-image.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# Build an Alpine Linux image containing curl-impersonate and push to
|
||||
# Docker hub.
|
||||
name: Publish Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
push-docker-image:
|
||||
name: Push Docker image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta_chrome
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: lwthiker/curl-impersonate
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
flavor: |
|
||||
suffix=-chrome-alpine3.15
|
||||
|
||||
- name: Build and push the Chrome version of curl-impersonate
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
context: chrome/
|
||||
file: chrome/Dockerfile.alpine
|
||||
tags: ${{ steps.meta_chrome.outputs.tags }}
|
||||
labels: ${{ steps.meta_chrome.outputs.labels }}
|
Reference in New Issue
Block a user