mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-04 11:38:33 +00:00
* workflow: add testing-env image build/publish process replacing https://hub.docker.com/r/runatlantis/testing-env Signed-off-by: Rui Chen <rui@chenrui.dev> * refresh the testing-env image * only runs on master branch Signed-off-by: Rui Chen <rui@chenrui.dev>
36 lines
1003 B
YAML
36 lines
1003 B
YAML
name: testing-env-image
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- ./testing/**
|
|
- .github/workflows/testing-env-image.yml
|
|
branches:
|
|
- "master"
|
|
workflow_dispatch:
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: testing
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Login to Packages Container registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- run: echo "TODAY=$(date +"%Y.%m.%d")" >> $GITHUB_ENV
|
|
- name: build testing-env:${{env.TODAY}} image
|
|
run: |
|
|
docker build -t ghcr.io/runatlantis/testing-env:${{env.TODAY}} .
|
|
- name: publish testing-env:${{env.TODAY}} image
|
|
run: |
|
|
docker push ghcr.io/runatlantis/testing-env:${{env.TODAY}}
|
|
docker tag ghcr.io/runatlantis/testing-env:${{env.TODAY}} ghcr.io/runatlantis/testing-env:latest
|
|
docker push ghcr.io/runatlantis/testing-env:latest
|