mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-01 23:28:42 +00:00
workflow: add testing-env image build/publish process (#1780)
* 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>
This commit is contained in:
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -4,10 +4,10 @@ jobs:
|
||||
test:
|
||||
name: runner / gotest
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/runatlantis/testing-env:805e94e7f648eddb0484e539a7b51410d39529bc
|
||||
container: ghcr.io/runatlantis/testing-env:2021.08.31
|
||||
steps:
|
||||
# user in image needs write access to do anything
|
||||
- name: setup
|
||||
run: sudo chmod -R 777 $GITHUB_WORKSPACE /github /__w/_temp
|
||||
- uses: actions/checkout@v2
|
||||
- run: make test-all
|
||||
- run: make test-all
|
||||
|
||||
35
.github/workflows/testing-env-image.yml
vendored
Normal file
35
.github/workflows/testing-env-image.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
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
|
||||
Reference in New Issue
Block a user