All checks were successful
Build and Push Docker Image / build (push) Successful in 41s
actions/checkout@v3's Basic auth header pattern fails with 403 when accessing a different private repository. Switch to a plain git clone with the CRT_READ_ONLY token embedded in the HTTPS URL.
40 lines
979 B
YAML
40 lines
979 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Clone schwab-scraper
|
|
env:
|
|
CLONE_TOKEN: ${{ secrets.CRT_READ_ONLY }}
|
|
run: |
|
|
mkdir -p vendor
|
|
git clone --depth=1 --branch main \
|
|
"https://x-access-token:${CLONE_TOKEN}@gitea.ext.ben.io/b3nw/schwab-scraper.git" \
|
|
vendor/schwab-scraper
|
|
|
|
- name: Login to Gitea Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: gitea.ext.ben.io
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.CR_PAT }}
|
|
|
|
- name: Build and Push
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: gitea.ext.ben.io/${{ gitea.repository }}:latest
|