test: add apt service test #3128
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-push | |
on: | |
push: | |
branches-ignore: | |
- gh-readonly-queue/** | |
merge_group: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
env: | |
DRY_RUN: ${{ github.ref_name != 'main' }} | |
OWNER: ${{ github.repository_owner }} | |
FILE: base | |
BUILDKIT_PROGRESS: plain | |
BUILDX_NO_DEFAULT_LOAD: 1 | |
NODE_VERSION: 18.17.1 # renovate: datasource=node depName=node | |
CONTAINERBASE_VERSION: ${{ github.sha }} | |
APT_HTTP_PROXY: http://172.17.0.1:8000 | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yml | |
permissions: | |
contents: read | |
checks: write | |
secrets: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
release: | |
needs: [build] | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
permissions: | |
contents: write | |
packages: write | |
id-token: write | |
steps: | |
- name: docker-config | |
uses: containerbase/internal-tools@a2eb489b908609773490b08e7ff52bdeb196f5c6 # v1.21.14 | |
with: | |
command: docker-config | |
# full checkout for semantic-release | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1 | |
- name: init | |
run: | | |
echo "OWNER=${OWNER,,}" >> ${GITHUB_ENV} | |
- name: Set up Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: yarn | |
- name: enable corepack | |
run: sudo corepack enable | |
- name: Init platform | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.symlinks true | |
git config --global user.email 'renovate@whitesourcesoftware.com' | |
git config --global user.name 'Renovate Bot' | |
echo "CACHE_WEEK=$(date +%U)" >> $GITHUB_ENV | |
- name: Docker registry login | |
if: github.ref_name == 'main' | |
run: | | |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
- name: Installing dependencies | |
run: yarn install | |
- name: prepare apt proxy | |
run: sudo yarn prepare:proxy | |
- name: semantic-release | |
if: github.event_name == 'push' | |
run: yarn semantic-release --dry-run ${{env.DRY_RUN}} --ci ${{env.DRY_RUN != 'true'}} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |