mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2025-08-10 10:49:26 +00:00
63 lines
2.1 KiB
YAML
63 lines
2.1 KiB
YAML
# 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 (chrome)
|
|
id: meta_chrome
|
|
uses: docker/metadata-action@v3
|
|
with:
|
|
images: lwthiker/curl-impersonate
|
|
tags: |
|
|
type=semver,pattern={{version}},suffix=-chrome-alpine
|
|
type=semver,pattern={{version}},suffix=-chrome
|
|
type=semver,pattern={{major}}.{{minor}},suffix=-chrome-alpine
|
|
type=semver,pattern={{major}}.{{minor}},suffix=-chrome
|
|
|
|
- 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 }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker (firefox)
|
|
id: meta_firefox
|
|
uses: docker/metadata-action@v3
|
|
with:
|
|
images: lwthiker/curl-impersonate
|
|
tags: |
|
|
type=semver,pattern={{version}},suffix=-ff-alpine
|
|
type=semver,pattern={{version}},suffix=-ff
|
|
type=semver,pattern={{major}}.{{minor}},suffix=-ff-alpine
|
|
type=semver,pattern={{major}}.{{minor}},suffix=-ff
|
|
|
|
- name: Build and push the Firefox version of curl-impersonate
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
push: true
|
|
context: firefox/
|
|
file: firefox/Dockerfile.alpine
|
|
tags: ${{ steps.meta_firefox.outputs.tags }}
|
|
labels: ${{ steps.meta_firefox.outputs.labels }}
|